Not gonna lie, my language is C#, not Lua, so I've just yolo'd this project and I need help with something. I'm making a game (obv), and I need to make it where the player can buy this AR when they click it. Here's my code that isn't working:
Player = game.Players.LocalPlayer
script.Parent.ClickDetector.MouseClick:Connect(function()
if Player.LeaderBoard.Money.Value >= 500 then
Player.LeaderBoard.Money.Value = Player.LeaderBoard.Money.Value - 500
game.ReplicatedStorage.M18:clone().Parent = Player:WaitForChild("Backpack")
else
end
end)
Please help.

5 comments
thank you! been trying to do this FOREVER
No problem. Please accept my answer.
how do i do that? lmao
For new users, there's been a bug going around that you have to go into incognito mode to accept an answer. The button should be under my answer.
ahh, yeah, had to go incog.