I'm lost on how I clone a GUI from ReplicatedStorage
into the PlayerGui
which is moved to Team "Special Players". I've been testing, but I couldn't find the reason. Any help?
local special = game.Teams:findFirstChild("Special Players") function onEntered(player) if checkOkToLetIn(player.Name) then player.TeamColor = special.TeamColor game.ReplicatedStorage.GreetingScreen:Clone().Parent = player.PlayerGui end end
local special = game.Teams:findFirstChild("Special Players") game.Players.PlayerAdded:connect(function(player) if checkOkToLetIn(player.Name) then player.TeamColor = special.TeamColor game.ReplicatedStorage.GreetingScreen:Clone().Parent = player:WaitForDataReady("PlayerGui") end end)
This should work, you should use WaitForDataReady()
Because you don't want the script load before the PlayerGui exists.