Why doesn't my run script work? Is there something in the code that is missing or misspelled? [closed]
game:Service("UserInputService").InputBegan:connect(function(input,gameprocesed)
if input.KeyCode == Enum.KeyCode.Shift then
for i = 1,16 do
wait()
game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView + 1.6
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed + 1
end
end
end)
game:GetService("UserInputService").InputEnded:connect(function(input,gameprocesed)
if input.KeyCode == Enum.KeyCode.LeftShift then
for i = 1,16 do
wait(1)
game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView - 1.6
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed - 1
end
end
end)
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:connect(function()
game.Workspace.Camera.FieldOfView = 70
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
script.Disabled = true
end)
Closed as Non-Descriptive by TheeDeathCaster
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?