I need to know if the following script would work correctly, if it will or I did something wrong, please leave feedback in the form of an answer, please.
Click > Walkspeed 100 Click Again > Walkspeed 15
local Player = game.Players.LocalPlayer
local Humanoid = Player.Character.Humanoid
function onClick()
Humanoid.Walkspeed = 100
if Humanoid.Walkspeed == 100 then
Humanoid.Walkspeed = 15
else
Humanoid.Walkspeed 100
end
script.Parent.MouseButton1Click:connect(onClick)

2 comments
You always set the WalkSpeed to 100 at the beginning, then you always check if it is equal to 100, and it always is, because you just set it, so after clicking once (or many times) the WalkSpeed will always be 15.
okay