I am trying to only give certain people tools when they enter my game but it's not working. Does anyone know how to do it? Thank in advance!
~Veloxityx3x
I am trying to only give certain people tools when they enter my game but it's not working. Does anyone know how to do it? Thank in advance!
~Veloxityx3x
admins = {"Player", "Veloxityx3x"} --Add more if you want
tool = nil --Replace nil with the tool
game.Players.PlayerAdded:connect(function(player)
for _, v in pairs(admins) do
if player.Name == v then
player:WaitForChild("Backpack")
tool:Clone().Parent = player.Backpack
end
end
end)
So, we begin with a table of admin names. We then make a variable for the tool. Then, we need to start a function for when a player is added. PlayerAdded passes an argument to the connected function that is the player that joins. We then look through the admin name table. If the player's name is one of those admin names, we will...
This discussion is preserved as it was. New answers, comments, and votes are closed.