Okay so I am trying to make a System where the players receive’s a tool when the round starts.
local Storage = game:GetService("ReplicatedStorage")
-- Abilities
local Push = Storage:WaitForChild("Push")
local Punch = Storage:WaitForChild("Punch")
local SuckerPunch = Storage:WaitForChild("Sucker Punch")
-- leaderstats
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local leaderstats = Player:WaitForChild("leaderstats")
local Rank = leaderstats:WaitForChild("Rank")
function Give(Name)
local Tool = Storage:FindFirstChild(Name)
if Tool then
Tool:Clone().Parent = Player.Backpack
end
end
while true do
Give(Push)
if Rank.Value > 9 then
Give(Punch)
end
if Rank.Value > 19 then
Give(SuckerPunch)
end
task.wait(119)
task.wait(14)
end
Check if your local script is enabled and where is it parented? And check if the instances you’re trying to access like leaderstats or push actually exist.
Even if the script did work it wouldn’t really since you’re giving the player’s backpack a tool on the client side. So other players won’t see the tool.
You should be doing this in a server script. Then Loop through every player object in game.Players:GetPlayers() and then run your functions like push.
Yeah, this may be an issue because you’re giving the tools via player, so what happens is that: Your player can see it but the others don’t because the server can’t see the tool because you used LocalScript.