Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

May someone help me with a Weapon tool giving Button?

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.

3 comments

1

Use :clone() to create multiple copies

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

0

Thank you so much cant believe im that stupid lol

1 answer

✓ Accepted answer

Clone the tool in the loop.

Hope this helped :)

This discussion is preserved as it was. New answers, comments, and votes are closed.