local admins = {"j"} game.Players.PlayerAdded:connect(function(plr) local allowed = false for i = 1, #admins do if plr.Name == admins[i] then allowed = true end end if allowed == false then plr.Backpack:WaitForChild("Kick"):Destroy() end end)
The script above is supposed to remove the "Kick" tool from a players backpack but it literally does nothing. No errors, no nothing. It's stored in ServerScriptService.
Here's the problem. You should be cloning the "Kick" tool into the Player's backpack and having said tool inside the ReplicatedStorage.
local admins = {ājā} game.Players.PlayerAdded:connect(function(plr) local allowed = false for i = 1, #admins do if [plr.Name](http://plr.name/) == admins[i] then allowed = true end end if allowed then local newKickTool = game:GetService("ReplicatedStorage").Kick:Clone() newKickTool.Parent = plr.Backpack end end)
Another thing i'm wondering is in line five. Why would you need to get a URL to check if someone is an admin? Why not use UserIds?
Anyways, in the code above we have a conditional statement that checks if the allowed boolean is true. If it is we'll get the Kick tool inside the ReplicatedStorage and clone it, and parent it into the backpack. Simple!