I'm trying to make a local script detect what the teams are, the colors of the teams "NATO" Bright blue and "OPFOR" Bright red. So what's the problem with this?
if script.Parent.Parent.Team=="NATO" then
script.Parent.Scripts.PlayerRig.Disabled=true
script.Parent.Scripts.PlayerRig2.Disabled=false
wait(0)
script.Parent.Scripts.Animate.Disabled=false
script.Parent.Scripts.HatAnimationSoundRemover=false
elseif script.Parent.Parent.Team=="OPFOR" then
script.Parent.Scripts.PlayerRig.Disabled=false
script.Parent.Scripts.PlayerRig2.Disabled=true
wait(0)
script.Parent.Scripts.Animate.Disabled=false
script.Parent.Scripts.HatAnimationSoundRemover=false
end

1 comment
What kind of object is script.Parent.Parent.Team? I assume it's a property, but no such property exists. If you're trying to access player.TeamColor, you'll get a BrickColor-value, not a string (team-name).