I placed my tool in serverstorage, and now want to clone it to the players backpack. My problem is that I only want it to clone to the backpacks of the people Who are trusted.
local trusted = {} --Player name here
I only want the tool to be given to the players in that list.
How would I do this?
local Trusted = {"PlayerNameHere"}
function GiveBtools(str, player)
for i=1, #Trusted do
local OwnerTools = game.ServerStorage["Building Tools"]:Clone()
OwnerTools.Parent = player.Character.Backpack
end
end
Updated code: Still won't work
local Owners = {"Player1"}
function GiveBtools(str, player)
for i=1, #Owners do
if player.Name == Owners[i] then
local BTools = game.ReplicatedStorage["Building Tools"]:Clone()
BTools.Parent = player.StarterGear
end
end
end
