✓ Accepted answer
This script is a recipe for crashes. Currently it keeps cloning this script to the PlayerGui and from there the cloned scripts start cloning themselves too. I'd create a script with something like this.
function Show(player)
local clone = game.ServerStorage.Script:Clone()
clone.Parent = player.PlayerGui
end
game.Players.PlayerAdded:connect(Show(player))
Then put the script you want to copy into the ServerStorage and change it in the script. This way it will only run once. And if you want it to do it everytime a player spawns. Use the following script.
function Show(player)
local clone = game.ServerStorage.Script:Clone()
clone.Parent = player.PlayerGui
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(Show(player))
end)
3 comments
What if he needs to do that for everytime he spawns? The PlayerGui resets to what is inside the StarterGui each time you respawn.
If he needs to run that script everytime someone spawns, then he has to make his question more specific. It's that simple. Edit: I added another script that does it on each respawn.
It didn't work right away but with a few upgrades it worked well :)