Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Changing Player Camera Mode on Death?

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)

1 answer

✓ Accepted answer

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

1 comment

0

I mean on the Starter screen i want it to be off

This discussion is preserved as it was. New answers, comments, and votes are closed.