Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't this gui stats changer work?

function onClicked(thingy)
	thingy.Character.Humanoid.MaxHealth = 125
	thingy.Character.Humanoid.MaxHealth = 125
	thingy.Character.Humanoid.WalkSpeed = 16
end

script.Parent.MouseButton1Down:connect(onClicked)

This is it. Sorry i just started scripting for like a few months ago

1 comment

2

What are you trying to do with this script? It would help if you explained what this was (a tool?) and what the idea was to accomplish.

2 answers

✓ Accepted answer
local p=game.Players.LocalPlayer

script.Parent.MouseButton1Down:connect(function(x,y)
	p.Character.Humanoid.MaxHealth=125
	p.Character.Humanoid.Health=125
	p.Character.Humanoid.WalkSpeed=16
end)

1 comment

0

thx a lot!

Try using MouseClick instead of MouseButton1Down

For reference

this and this

For the purposes of this answer, i assume you want to get the player who clicked a part.

This discussion is preserved as it was. New answers, comments, and votes are closed.