#button checking

13 messages · Page 1 of 1 (latest)

timid comet
#

how do i make the localscript in the menu gui to check the name of the button which was pressed so that fire the remoteevent which has the name of the button

scenic remnant
#

Button.MouseButton1Click event

timid comet
#

elaborate

#

please

scenic remnant
#

Button.MouseButton1Click:Connect(function()
RemoteEvent:Fire(Button.Name)
end)

timid comet
#

well there are multiple buttons so it has to check which button was clicked so that can happen

scenic remnant
#

With button is the button you want

#

Like
local Button = pathtobutton
Button.MouseButton1Click:...

latent pine
#

you can use for to loop thru stuff

#

"i" would be the index/number of the object, "v" would be the object

scenic remnant
#

In luau you don't need pairs / ipairs