I've just finished creating this code that should find a folder named "Tools" in the ReplicatedStorage and give them the gear within the folder but it isn't working?
Code:
local gamepass = script:WaitForChild("GamePassid")
local service = game:GetService("GamePassService")
game.Players.PlayerAdded:connect(function(player)
if service:PlayerHasPass(player,gamepass.Value) then
local tools = game.ReplicatedStorage:WaitForChild("Tools")
for i,v in pairs(tools:getChildren()) do
if v:isA("Tool") then
v:Clone().Parent = player:WaitForChild("Backpack")
v:Clone().Parent = player:WaitForChild("StarterGear")
end
end
end
end)
