I have it were when you click a button it changes your camera mode but when you die i want it to reset the camera mode to free i have the script here which works in Studio but not in-game its a normal script in serverscriptservice and localscripts don't work!
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() player.CameraMode = 0 end) end) end)
http://wiki.roblox.com/index.php?title=API:Class/Player/CameraMode
Notes: This item should be used in a LocalScript to work as expected online.
Just do this in a localscript instead and it will work fine, you can just have one line in any local script which will automatically run when they die anyway
game.Players.LocalPlayer.CameraMode = 0