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

How to I make a in game GUI item shop pop up when a player clicks a part/model?

Asked by 7 years ago

So when a player gets enough in game currency (money) to buy a tool upgrade. I made a shop where the tools are sold and I want the player to click the tool they want to buy that's on the shelf and I want a GUI to pop up with a small description and the option to buy. I am new to scripting and even newer to making GUIs if anybody could help I would appreciate it.

0
Do you have any scripts to show? We can't just make it for you User#16405 0 — 7y
0
Of course not and I'm not asking for it to be made I just want a push in the right direction. Farmerperson 6 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Put this in the model your clicking on. (make sure this script is inside a part) make sure you have a click detector! and make sure the gui is not enabled in the properties tab.

script.Parent.ClickDectector.MouseDown:connect(function()
    local gui = game.StarterGui.ScreenGui
    gui.Enabled = true
end

you may change line 1 for the "script.Parent". Most likely not.

if this didn't work then use output to help you out. If this worked please accept this answer!

-Mohawkid14

0
THANKK YOUU Farmerperson 6 — 7y
Ad

Answer this question