There's a few things wrong with this script. One thing is that you didn't define what the function handout()
is. The other thing is that you didn't say what each of the number in the math.random(1,8)
is.
Possible fix (This would be if someone clicked a button they would get it):
function onClicked(Player) wait(5) math.random(1,8) if math.random = 1 then local toclone = game.Lighting.Knife local cloned = toclone:Clone(Player) elseif math.random(1,8) = 2 then local toclone = game.Lighting.NEXTTOOL local cloned = toclone:Clone(Player) end end) script.Parent.MouseButton1Down:connect(onClicked)
I'm sure this is broken in some way so if anybody could tell me what I did wrong that would be appreciated!
tkd did it right except he did the connection wrong at the end.
script.Parent.MouseButton1Click:connect(function()