The text for this isnt changing. I dont know if im using the team.PlayerAdded event wrong.
game.Teams.Red.PlayerAdded:Connect(function(player) if player.Team = game.Teams.Blue then script.Parent.Text = "Protect this statue!" end end) game.Teams.Red.PlayerAdded:Connect(function(player) if player.Team = game.Teams.Blue then script.Parent.Text = "Attack this statue!" end end)
You're checking if the player is on the Blue team when he's joined the Red team, which makes no sense.
The teams don't replicate to the client instantly, so you'll want to use WaitForChild instead.
You shouldn't be indexing Services directly, instead use GetService.
Solution:
local teams = game:GetService('Teams') local red = teams:WaitForChild("Red") local blue = teams:WaitForChild("Blue") red.PlayerAdded:Connect(function(player) if player.Team == red then script.Parent.Text = "Protect this statue!" end end) blue.PlayerAdded:Connect(function(player) if player.Team == blue then script.Parent.Text = "Attack this statue!" end end)
Hope this helped