Im trying to make a screen gui clone for admins only.
script:
game:GetService("Players")
local og = script.Parent
local new = og:Clone()
game.Players.PlayerAdded:Connect(function(player)
if player.UserId == --my ID or player.UserId == another Id then
wait(5)
new.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
end
end)
i get this error
ServerScriptService.Sperat.Show:8: attempt to index nil with 'WaitForChild'
Edit: i see what I did wrong, I mentioned the local player from the server, but how would I re-write it?