I cant get a text label via the player gui?
Im trying to make a hide and seek game and i cant get the gui via player gui (sorry if i dont fully understand player gui im new)
the code is
1 | local player = game.Players.LocalPlayer |
2 | local allplyrs = game.Players:GetPlayers() |
5 | local seeker = table.remove(allplyrs, math.random( 1 , #allplyrs)) |
6 | local sc = seeker.PlayerGui:WaitForChild( "ScreenGui" ) |
7 | local tl = sc:WaitForChild( "TextLable" , 30 ) |
9 | tl.Text = "You are: Seeker" |
and the error is:
" 20:34:42.323 Players.cjkizzy286.PlayerGui.ScreenGui.TextLabel.Teamsetter:9: attempt to index nil with 'Text' - Client - Teamsetter:9"
you can see where the script is via error
and finally its a local script