I made a GUI recently and tried to show it only for VIP server owners, however this did not work. What i am trying to do is make a vip server benefit GUI. Here is the code i used:
local gui = game.ServerStorage.VIPBENEFITS
game.Players.PlayerAdded:Connect(function(plr)
if plr.UserId == game.PrivateServerOwnerId then
local cloned = gui:Clone()
cloned.Parent = game.StarterGui
end
end)
game.Players.PlayerAdded:Connect(function(plr)
if plr.UserId == game.PrivateServerOwnerId then
local cloned = gui:Clone()
cloned.Parent = plr:WaitForChild("PlayerGui")
end
end)