So a person named "Ziffix" scripted me this script were only certain players listed in the table can view the Gui. The problem is that the people that have permission to view the Gui, when they die the Gui disappears and they need to rejoin for it to appear once again which will be annoying. Can someone help me and make it so it's there forever for the people who have permission to view the Gui?
Here is the script:
local Players = game:GetService("Players")
local AuthorizedUsers = {[525025404] = "Nitrolux200";}
local GUI = script.HostOnlyGui
Players.PlayerAdded:Connect(function(Player)
if (AuthorizedUsers[Player.UserId]) then
---------------
GUI:Clone().Parent = Player.PlayerGui
end
end)

3 comments
set the ResetOnSpawn property of the gui to false
^ simpler way to fix it than using characteradded
Thanks that worked too! I'm using the resetonspawn thing because it's simpler, but the character added worked