This event in the script its supposed to change the cframe of the current camera if the player is on a team but it doesn't work
game.Players.PlayerAdded:Connect(function(plr) plr.Chatted:Connect(function() if plr.TeamColor == BrickColor.new("Maroon") then camera.CFrame = workspace.cameraimplicado.CFrame end end) end)
Full script:
local player = game.Players.LocalPlayer local camera = workspace.CurrentCamera repeat wait() camera.CameraType = Enum.CameraType.Scriptable until camera.CameraType == Enum.CameraType.Scriptable camera.CFrame = workspace.camerajuez.CFrame camera.FieldOfView = 60 game.Players.PlayerAdded:Connect(function(plr) plr.Chatted:Connect(function() if plr.TeamColor == BrickColor.new("Maroon") then camera.CFrame = workspace.cameraimplicado.CFrame end end) end)
You can't use
workspace.CurrentCamera
in a server script.
Oops my bad i had to remove the player added and put local player, Solved
Fixed local script:
local player = game.Players.LocalPlayer local camera = workspace.CurrentCamera repeat wait() camera.CameraType = Enum.CameraType.Scriptable until camera.CameraType == Enum.CameraType.Scriptable camera.CFrame = workspace.camerajuez.CFrame camera.FieldOfView = 60 player.Chatted:Connect(function() if player.TeamColor == BrickColor.new("Maroon") then camera.CFrame = workspace.cameraimplicado.CFrame end end)