I'm fairly new to scripting and I'm trying to make a localscript where when it runs the script checks to see if the localplayer is on a certain team (BlueTeam in this case) and then waiting 2 seconds before making the textlabel invisible.
I'm not getting any errors in Output but the script isn't working.
player = game.Players.LocalPlayer
blueText = player.PlayerGui.ScreenGui.Blue.BlueText
function myFunction()
if player.Team == 'BlueTeam' then wait(2)
blueText.Visible = false
end
end
myFunction()
