1 | local player = game.Players.LocalPlayer.Character.Humanoid |
2 |
3 |
4 |
5 | function gui() |
6 | player.WalkSpeed = 50 |
7 | end |
8 | script.Parent.MouseButton 1 Click:connect(gui) |
I tried this with Local and normal scripts. There is nothing in the output. This is in a TextButton
See the problem here > https://www.roblox.com/games/622386122/GUI-test
In LocalScript in TextButton in Frame in GUI(If not in a Frame, just delete one of "Parent"s at second line.)
01 | script.Parent.MouseButton 1 Click:connect( function () |
02 | Player = script.Parent.Parent.Parent.Parent.Parent |
03 | Character = game.Workspace:FindFirstChild(Player.Name) |
04 | if Character ~ = nil then |
05 | Hum = Character:FindFirstChild( "Humanoid" ) |
06 | if Hum ~ = nil then |
07 | Hum.WalkSpeed = 50 |
08 | end |
09 | end |
10 | end |
Hope this works.