The title explains it all. I can't figure out why the loading screen doesn't load into the player's gui when loading into the game. Can someone help?
function onPlayerEnter() local gui = script.Parent.Gui.LoadingGui local playergui = game.Players.LocalPlayer:WaitForChild("PlayerGui") gui:Clone().Parent = playergui end game.Players.PlayerAdded:Connect(onPlayerEnter)
The server shouldn't be manipulating the PlayerGui. Use a RemoteEvent to do so and a LocalScript to show or clone the gui.
The Client shouldn't be checking for a player to join either. Instead use a RemoteEvent for this.
Either solution should solve your issue.
What it looks like you're doing is trying to call LocalPlayer through what looks like a server script. What you should do is use the "Player" argument of the PlayerAdded function.
function onPlayerEnter(player) local gui = script.Parent.Gui.LoadingGui local playergui = player:WaitForChild("PlayerGui") gui:Clone().Parent = playergui end game.Players.PlayerAdded:Connect(onPlayerEnter)
Try function onPlayerEntered() or convert it to a ServerScript.