I was making a shop GUI for my place, when I encountered a little problem, can you correct this for me? I can't really find the mistake. I know its somewhere near "function buy()". Also I used a similar script for another object, and it worked fine, I don't know whats wrong with this particular item. You also need to add the weapon to the lighting and have the points leaderboard I made.
player = script.Parent.Parent.Parent.Parent.Parent money = player.leaderstats.Points upgradeStuff = game.Lighting.Golden Katana
function buy() if money.Value >= 1500 then money.Value = money.Value - 0 local a = upgradeStuff:clone() a.Parent = player.Backpack end end script.Parent.MouseButton1Down:connect(buy)