Can anyone tell me what wrong with this script.
Player=script.Parent.Parent.Parent.Parent.Parent script.Parent.Text=tostring(script.Parent.ItemName.Value)..": "..tonumber(script.Parent.Cost.Value).." "..tostring(script.Parent.Currency.Value) script.Parent.MouseButtom1Click:connect(function() if Player:findFirstChild("leaderstats") then if Player.leaderstats[script.Parent.Currency.Value].Value>=tonumber(script.Parent.Cost.Value) then Player.leaderstats[script.Parent.Currency.Value].Value=Player.leaderstats[script.Parent.Currency.Value].Value-tonumber(script.Parent.Cost.Value) game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.Backpack game.Lighting[script.Parent.ItemName.Value]:Clone().Parent=Player.StarterGear end end end)
The script is inside a Textbuttom which is inside a frame which is inside a SurfaceGui
Look at your Script Output. Is it generating any errors? If so, then what are they?