Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make it so my gui stops deleting it self?

Its a script in serverscriptservice so only i can see it. It works but when i reset or die then it deletes it self. CP is the GUI

local allowed = {"jakubiscool5", "Nobody"}

game.Players.PlayerAdded:Connect(function(player)
	for i, v in pairs(allowed) do
		if player.Name ==v then
			script.CP:Clone().Parent = player:WaitForChild("PlayerGui")
		end
	end
end)

3 comments

0

Please provide us with your scripts for us to be able to help you.

0

In the server script did you do "game.StarterGui.Gui:Destroy()"

0

When you're dealing with GUIs you should be using a local script, it makes no sense to use a server script

1 answer

✓ Accepted answer
local Players,gui=game.Players,script.CP
local allowed = {"jakubiscool5", "Nobody"}
gui.ResetOnSpawn=false
local function onPlayerAdded(player)
if table.find(allowed,tostring(player))then
wait()gui:Clone().Parent=player.PlayerGui
end
end;Players.PlayerAdded:Connect(onPlayerAdded)
for _,v in ipairs(Players:GetPlayers())do
onPlayerAdded(v)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.