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

Why doesn't my run script work? Is there something in the code that is missing or misspelled? [closed]

Asked by
ISyisp -5
5 years ago
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)

0
Telepathy gang. Interesting feedback. Lovely lack of error messages too. No additional info? Wonderful. TheeDeathCaster 2368 — 5y

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?