So when they touch a part in workspace I want the script to check if the player is in a certain team, if so then take their cframe and put it on the other side of the door. Thing is I don't think I am finding the players team Color properly. Yes, this is a server script.
script.Parent.Touched:connect(function(hit)
print("Yes")
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
print("Just random words")
if player then
print("Getting better")
if player.Team.TeamColor == "Bright Red" then
print("Found color")
print("Apart of this dorm")
hit.Parent.Torso.CFrame = script.Parent.CFrame + Vector3.new(0,0,5)
end
end
end)

1 comment
if player.Team.TeamColor == "Bright Red" then should be if player.TeamColor == BrickColor.new("Bright red") then