Didn’t work either, no warnings.
look, show us the team the player is in (from his properties)
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local camera = game.Workspace:WaitForChild("Camera") --just incase you wanted to change any fov properties, ect
--starting team
player.TeamColor = BrickColor.new("White") --make sure to change all of the BrickColor.new("Dusty Rose") to your team color
--if you want a specific player to be on a certain team instantly
if player.UserId == 0000 then --change 0000 to the user id
player.Team = BrickColor.new("Dusty Rose") --change to team you want
end
player:GetPropertyChangedSignal("Team"):Connect(function() --checks if team is changed
if player.TeamColor == BrickColor.new("Dusty Rose") then --checks if the team is the team you choose
player.CameraMode = Enum.CameraMode.LockFirstPerson --locks to first person
else --if not the team you want
player.CameraMode = Enum.CameraMode.Classic --makes camera classic
end
end)
I didn’t go too in-depth with testing it, but please add or change anything to your liking!
sorry if any of that was confusing, I’m not a too advanced scripter
That didn’t really work, but I’m actually starting to understand a lot about Enum, which might make me realize what is happening and how to fix it.
could you tell me what went wrong? i’d like to attempt to fix it!
The thing is, I already have set teams. What I need to happen is whenever a player switches to the really red team, they are forced into first person.
alright, whats the color of the audience team?
and which team do you want to be forced to first person*
White, and contestants are really red.
The Contestants/Celebrity team.
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local camera = game.Workspace:WaitForChild("Camera") --just incase you wanted to change any fov properties, ect
--starting team
player.TeamColor = BrickColor.new("White") --audience team
--if you want a specific player to be on a certain team instantly
if player.UserId == 0000 then --change 0000 to the user id
player.Team = BrickColor.new("Really red") --contestants/celebrity
end
player:GetPropertyChangedSignal("Team"):Connect(function() --checks if team has been changed
if player.TeamColor == BrickColor.new("Really red") then --checks if theyre on contestants/celebrity team
player.CameraMode = Enum.CameraMode.LockFirstPerson --locks to first person
else --if not the team you want
player.CameraMode = Enum.CameraMode.Classic --makes camera classic
end
end)
I edited it a bit, if it doesn’t work tell me if there’s any errors or things that need to be changed.
did you place it in a localsript inside of startercharacterscripts?
That’s the one thing I haven’t done, let me try that.
IT WORKED! Thank you so much, that took too long.
no problem! i hope everything works out.
It was provided as an example, that loop would be ran when necessary.