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

Why won't this work? [closed]

Asked by 10 years ago
Value = false

Player = game.Players.LocalPlayer
Character = Player.Character
Mouse = Player:GetMouse()

Mouse.KeyDown:connect(function(key)
wait()

if key:byte() == 50 then

if Value == true then
wait()
Value = false

elseif Value == false then
wait()
Value = true
end

wait()

if Value then
Character.Humanoid.WalkSpeed = 0
elseif Value == false then
Character.Humanoid.WalkSpeed = 16
end

end
end)

Why wont this work in-game mode? It only does in test mode/studio mode.

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?