Could I have a script that would change the FieldOfView to 20, wait 3 seconds, and then change back to 70. I can't seem to get it working, even through a localscript. Here's what I did:
game.Players.PlayerAdded:connect(player) player.CharacterAdded:connect(char) local cam = Workspace.CurrentCamera cam.CameraType = 'Scriptable' cam.FieldOfView = 20 wait(3) cam.FieldOfView = 70 end) end)
Your problem is simple. You are not using anonymous functions correctly.
Instead of,
game.Players.PlayerAdded:connect(player) player.CharacterAdded:connect(char) --code end) end)
It should be:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) --code end) end)
PlayerAdded is not for a localscript.
game.Players.PlayerAdded:connect(player) player.CharacterAdded:connect(char) local cam = Workspace.CurrentCamera cam.CameraType = 'Scriptable' cam.FieldOfView = 20 wait(3) cam.FieldOfView = 70 end) end)