My script where you press shift to run wont work? Please fix.
game:GetService("UserInputService").InputBegan:connect(function(input,gameprocesed)
if input.KeyCode == Enum.KeyCode.LeftShift 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()
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)
######Edited: Tab your code correctly! ~Goulstem

15 comments
what is the error?
kingdom5 thats what im trying to find out dude. I think it deals with capitilization error cause thats what roblox said.
^ I’m a bit confused. Are you saying there’s an error or not? If so, can you please post the full error?
Denny9876 i stated in the question there is a error. Why will i post a question if there was nothing wrong with it? I posted the whole script so i did post it.
on line 5 you have game.Workspace.camera it should be game.Workspace.Camera You should make variables to avoid repetition and these kind of mistakes
You should alos not that there is not checks between each loop run so you are able to spam shift to break this code
kingdom5 thanks! Reply as a answer so i can mark you correct
shouldn't it be workspace.CurrentCamera?
workspace.CurrentCamera is preferable but both should work (Camera is the default name of the CurrentCamera)
set the walkspeed to like 20 you are only adding one
why does this have -6
YOOOOOOOOOOOOOOOOO WHEREs GOULSTEM, I DIDNT SEE HIM IN 2 YEARS Brah, u just got an upvote
incapaz, it is because there is no description, just code. Not only that, but it goes against the community guidelines. They state: "Attempts should be your own work. Don't take a free model and expect us to fix it.""
I highly doubt this is his own work, or if it is, it is only his work in that he edited the script he found somewhere.
holy heck