Now im trying back to third person camera, but i think i have done something wrong. Of course it's onTouch.
function onTouch(part) local player = game.Players:GetPlayers(part.Parent) if player ~= nil then player.CamerMode = "Classic" end end script.Parent.Touched:connect(onTouch)
I think the method you're looking to use is GetPlayerFromCharacter.
GetPlayers gets all the players in the game and returns them in an array,while GetPlayerFromCharacter essentially gets the player from the player's character, if there is a player associated with said character.
function onTouch(part) local player = game.Players:GetPlayerFromCharacter(part.Parent) if player ~= nil then player.CameraMode = "Classic" end end script.Parent.Touched:connect(onTouch)
I hope my answer helped you. If it did, be sure to accept it.