Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Do I need to have a mousebutton1click function in a local script inside the button?

Asked by
trecept 367 Moderation Voter
6 years ago

So I want to teleport and change the health of the player when they click a button, but I don't want to do this through a local script. Is there any possibility a server script in the server script service would be able to have a mousebutton1click function to the button? If not, how can I change the health of a player in a local script with FE enabled?

1 answer

Log in to vote
0
Answered by 6 years ago

You will need to use a localscript when using MouseButton1Click in a GUI button. Also I think you can change the player’s health with a localscript by doing something like this :

game.Players.LocalPlayer.Character.Humanoid.Health = (PutNumberHere)
Ad

Answer this question