I added typeof but then it says I need an =, so I put that in but then it says that: "built in global 'typeof' is overwritten here; consider using a local or changing the name" so I just got the script to how it was before, any ideas?
function Click()
if
player.team.teamcolor == BrickColor.Red and script.Parent.Mousebutton1Click
then
script.Parent.Parent.Parent.Parent.Character.HumanoidRootPart.CFrame = CFrame.new(-13.2, 0.5, -35.27)
end
end
if script.Parent.MouseButton1Click:connect(Click) and player.team == BrickColor.Blue then
script.Parent.Parent.Parent.Parent.Character.HumanoidRootPart.CFrame = CFrame.new(-13.2, 0.5, -35.27) end
end
script.Parent.MouseButton1Down:connect(Click)

1 comment
... This is a easy fix you have too many ends.. and make sure you place the if on line 09 onto the function because that wont work that way..