Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a clone only ONCE, once a player joins ?

Asked by
Bulvyte 388 Moderation Voter
8 years ago
local gui = script.Intro:Clone()
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:wait()
    gui:Clone().Parent = player.PlayerGui
end)

this is the clone script, when player joins he gets gui. when he dies he shouldn't get it, but when he respawns the gui clones back in. help please

1 answer

Log in to vote
0
Answered by 8 years ago
local gui = script.Intro:Clone()
game.Players.PlayerAdded:connect(function(player)
local deb = false  -- debounce
    player.CharacterAdded:wait()
if deb == false then
    gui:Clone().Parent = player.PlayerGui
deb = true
end
end)

0
you do not understand. Debounce does not stop the cloning i asked to make the cloning ONLY clone then when player joins ONCE for him then never again happening again. and if he dies it wouldn't do that too. Bulvyte 388 — 8y
0
btw, it doesn't work even if in a LocalScript.. Bulvyte 388 — 8y
0
nvm i fixed it thx! Bulvyte 388 — 8y
Ad

Answer this question