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

Help with camera mode?

I want when I touch a part, the camera mode changes to "Classic"

game.Players.PlayerAdded:connect(function(player)
	script.Parent.Touched:connect(function(Touched)
	
    if player.Touched then
	
		local CameraMode = "Classic"

	
	
		end
	end)
end)

1 answer

✓ Accepted answer

You need to change the property in the Player. To do this, we simply get the player that touched the part, like you already did, then access the CameraModeproperty. We'll add that in and use the variable "CameraMode" that you set to change it.


To do this, we'll change up the script a little bit to make sure that it changes for the player that touched it.

script.Parent.Touched:connect(function(Touched)
	local player = game.Players:GetPlayerFromCharacter(Touched.Parent)
	if player then
		player.CameraMode = "Classic"
	end
end)

And there you go! That's all there is to it.


Anyways, if you have any further problems/questions, please leave a comment below, and I'll see what I can do. Hope I helped :P

####-Dyler3

1 comment

0

Does not work.

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