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

How to make a Custom made shop gui?

Asked by 10 years ago

I need help on making a shop gui I have tried youtube videos and still not working please help I am working on a game called Explore The City/World Of Fovero

1 answer

Log in to vote
1
Answered by 10 years ago

Sorry, I wont write you a whole script but I will give you some links to help you:

UDim2, this is used for position Guis via script. It also makes the size of the Gui the same on everyones computer

Instances, these are what you would use to create objects via script.

This is what you would use with buttons

now, all of that may seem a bit confusing too you, so this is how you could use those three little things to make a shop gui (this is not the shop gui im just making an example) oh and make sure that the script is in a LocalScript that is in the StarterGui

local player = game.Players.LocalPlayer
local mouse = player:GetMouse() --Make sure you have this!

scrn = Instance.new("ScreenGui",player.PlayerGui) --creating the screenGui
fr = Instance.new("Frame",scrn) --creating the frame

fr.Size = UDim2.new(0,500,0,500) --this will be the size of the frame. notice how i only use the second numbers
fr.Position = UDim2.new(0,600,0,400) --this will be the position of the frame

--ok now lets start with the button principles
mouse.Button1Down:connect(function() --activated when the left mouse button is clicked

scrn:Destroy() --when you click the frame, it will be removed

end) --ending the function. the parantheses are to close the function > '(function()'

Ad

Answer this question