player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
price = 30
coin = player.leaderstats.Simucoins
tool = game.ServerStorage.BShopUpgrades:FindFirstChild("RoTopR")
info = script.Parent.Parent
function BuyU1()
if coin.Value >= price then
coin.Value = coin.Value - price
local clone = tool:Clone()
clone.Parent = player.Backpack
local clone2 = tool:Clone()
clone2.Parent = player.StarterGear
script.Disabled = true
end
end
script.Parent.MouseButton1Click:Connect(BuyU1)
Whenever I press the button, my currency hasn't been taken and i haven't got my item. I'm confused, when i looked at my output it turned no results.
For My Gui: HShopGui (ScreenGui) > Frame (Frame) > Info (Frame) > BuyU1 (TextButton) > BuyUpgrade1 (Script).

3 comments
Is this a Localscript?
this was a normal script
I will try a local script