Not giving the gear to the player? [SOLVED]
Asked by
6 years ago Edited 6 years ago
Actual Error: (i'm really stupid lol)
While testing the script below, I was coping the money bag and inserting it directly into my backpack, forgetting that I need the gear to be inserted through the server script. (which I had, but to save time I did the copy and paste.) Thanks to everyone to helped!
Trying to make a vending machine to when you have a moneybag, it will remove it and give it to the player.
Problem is that it never makes it past the
Is there something I am doing wrong?
02 | local clickdetector = script.Parent.ClickDetector |
03 | local sound = script.Parent.Sound |
06 | clickdetector.MouseClick:Connect( function (plr) |
08 | local already = plr.Backpack:FindFirstChild( "Money Bag" ) |
09 | if already ~ = nil then |
10 | print ( "Did this work?" ) |
12 | plr.Backpack [ "Money Bag" ] :Destroy() |
15 | game.Lighting.BloxyCola:Clone().Parent = plr.StarterGear |
16 | game.Lighting.BloxyCola:Clone().Parent = plr.Backpack |