I have this in a server script
game.Workspace.Remote.GiveAdmin.OnServerEvent:connect() game.Players.PlayerAdded:connect(function(plr) local admins = {"azurael21", "Doxino", "IcyEvil", "EmperorVolvax"} for _,v in pairs(admins) do if v == plr.Name then x = game.ServerStorage.Bunny:Clone() x.Parent = plr.PlayerGui end end end)
and this in a local script
game.Workspace.Remote.GiveAdmin:FireServer()
I can't seem to remember how to script with FilteringEnabled, but I know I should at least be on the right track. Any and all help is appreciated.
OnServerEvent
to a function. You won't be needing it anyways. You will need OnClientEvent
to edit the PlayerGui
.--Server script local ReplicatedStorage = game:GetService("ReplicatedStorage") local giveAdmin = ReplicatedStorage:WaitForChild("GiveAdmin") local admins = { [41538450] = true, [game.CreatorId] = true -- Insert the UserId of your admins here. [userid] = true } game:GetService("Players").PlayerAdded:Connect(function(plr) if admins[plr.UserId] then giveAdmin:FireClient(plr) end end)
-- LocalScript, under StarterGui local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local gui = ReplicatedStorage:WaitForChild("AdminGui") -- Put it in ReplicatedStorage, putting it in server storage makes it inaccessible by client. local giveAdmin = ReplicatedStorage:WaitForChild("GiveAdmin") local player = Players.LocalPlayer local PlayerGui = player:WaitForChild("PlayerGui") giveAdmin.OnClientEvent:Connect(function() gui:Clone().Parent = PlayerGui end)