Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

May someone help me with a Weapon tool giving Button?

Asked by 6 years ago

this script here gives a tool to a random player when they click this button i want it to give it to all the players

script.Parent.MouseButton1Down:connect(function()
    tool = game.Lighting["Reaper-8"]:Clone()
    for i,v in pairs (game.Players:GetPlayers()) do
        wait()
        tool.Parent = v.Backpack
    end
end)

what it does is it gives only 1 tool to a random player it doesnt even give to the clicker unless he/she is the random player, I wanted it to give it to all the players.

1
Use :clone() to create multiple copies theCJarmy7 1293 — 6y
0
^He described it well. In case that you are not aware how to use that, you need to type: `tool:Clone().Parent = v.Backpack` superalp1111 662 — 6y
0
Thank you so much cant believe im that stupid lol Ind1v1duals 43 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Clone the tool in the loop.

Hope this helped :)

Ad

Answer this question