function onClick()
if script.Parent.Parent.Parent.CanTeleport.Value == true then
if script.Parent.BackgroundColor3==script.Parent.Parent.Parent.Parent.Parent.TeamColor.Color or script.Parent.Parent.Parent.Parent.Parent.TeamColor.Color == BrickColor.new("Black") and script.Parent.BackgroundColor3 == BrickColor.new("Bright red") then
script.Parent.Parent.Parent.CanTeleport.Value = false
script.Parent.Parent.Parent.Parent.Parent.Character.Torso.CFrame=game.Workspace.Flags[script.Parent.Text].Flag.CFrame
end
end
end
script.Parent.MouseButton1Click:connect(onClick)
while wait() do
script.Parent.BackgroundColor3 = game.Workspace.Flags[script.Parent.Text].Flag.BrickColor.Color
end
In the script that I'm making, the black team needs to be able to teleport to the places that the Bright Red team can teleport to. This doesn't seem to be working. No issues in the output.

3 comments
.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
Please check out the resources I placed in the answer to your other question, LocalPlayer will help you in this situation.
Please tell us what is going on with the parents. Try assigning a single variable so we actually know what is happening.