Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i make a surface gui shop?

Asked by 8 years ago

I have been having trouble for quiet some time now on how to make a surface gui shop and tried so many ways scripting it to but the item into my players inventory but is not working.

This is the latest way i have tried to get it to work

repeat wait() Player = game.Players.LocalPlayer button = script.Parent Item = game.Lighting.SprayPaint cost = 47 Money = Player.leaderstats.Money until

function onClicked(playerWhoClicked) Workspace["Shop Part 1"].surfaceGui.Loz.TextLabel.LocalScript = cript.Parent.ClickDetector.MouseClick:connect(onClicked)

    if Money.Value > (cost - 1) then
        Money.Value = Money.Value - cost
        local a = Item:Clone()
        a.Parent = Player.Backpack
        Local b = Item:Clone()
        b.Parent = Player.StarterGear
    end
0
I also forgot to add that i have a leaderstats peachyweachy11 5 — 8y

Answer this question