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

How can I change a players camera when they respawn, and are only on a certain team?

I have it set so that when a player respawns, it checks if they are on the right team, and then changes their camera but its not working?

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera

local character = player.CharacterAdded or player.CharacterAdded:Wait()

player.CharacterAdded:Connect(function()
	if player.Team == game.Teams.Coremen then 
		player.CameraAssist.Value = true 
		camera.CameraType = Enum.CameraType.Scriptable
		camera.CFrame = workspace.CoremenCamera.CFrame 
	end
end)

1 answer

Try adding local Teams = game:GetService("Teams")

then check if player.Team == Teams.Coremen

make sure to put prints inside the events as a sort of "debug" to make sure if things are running

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