I'm trying to make a randomized click giver, but I don't know what I'm doing wrong.
local Weapons = game.ReplicatedStorage.Weapons:GetChildren()
function onClick(plyr)
script.Parent.ClickDetector.MouseClick:connect(onClick)
local Weapon = Weapons[math.random(1,#Weapons)]:Clone()
Weapon.Parent = game.Players.LocalPlayer.Backpack
end
Thanks if you can help, I'm also a bit of a noob, so please go easy!

1 comment
Could you be a little more specific in your question? Also a little more of your code would help me see what is wrong.