How Do You Upload Images in Roblox
In the Articles/Intro to GUIs
guide, y'all learned the basics of GUIs, how to create a screen GUI canvas for all players that enter your game, and how to position and resize a TextLabel
GUI object on the screen. If you did not read through the Manufactures/Intro to GUIs
guide, please practise so first!
Let's expand on those concepts and explore how to insert images into the screen GUI infinite. This is a cracking manner to display icons, logos, background images, and other cool designs on the screen!
Calculation Images to a Screen GUI
Calculation an image to a screen GUI is very similar to adding a text label.
- In the Explorer window, find the ScreenGui object (you tin can employ the aforementioned one that you created in the
Articles/Intro to GUIs
guide) - Insert an
ImageLabel
object. Remember that you can notice an object quickly by typing the get-go few messages of its proper noun into the search field.
This will add an empty image label to the peak-left corner of the game view.
Upload an Paradigm
This placeholder is a good starting time, only evidently we demand a real prototype to put on the screen. Permit's upload an image now.
- In the Explorer window, select the new ImageLabel object.
- Within the Paradigm section of the Properties window, click on the Prototype property.
- In the popup window, click Add Image….
- In the next dialog, click the Choose File button. Notice an image on your estimator, select information technology, and confirm that you'd like to upload it.
- If y'all wish, type in a dissimilar name in the small Name input field. When ready, click the Create button.
- When finished uploading, you'll see the ImageLabel object updated with the prototype you selected!
Change the Label Backdrop
The image is now uploaded and applied to the ImageLabel object. Withal, at that place are some properties which we can alter to brand information technology await even better!
- Expand the Data section in the Backdrop window if it'due south not expanded already.
- For the BackgroundTransparency value, enter ane. This will make the epitome label background completely transparent so that anything behind it shows through.
- The size of the image characterization tin be set with the Size properties. First, change Size → X → Offset to 80.
- Similarly, change Size → Y → Starting time to 80 to keep the same proportions.
- The location of the epitome label tin be set with the Position properties. First, alter Position → X → Starting time to xl.
- Modify Position → Y → Offset to 20 to shift the label down a flake.
- Finally, plough the label counter-clockwise a minor corporeality past setting the Rotation value to -8.
Layering Images in a Screen GUI
Dandy! Now y'all understand how to upload images to Roblox and put them on the screen. When you start calculation more one image, though, you lot'll probably need to start thinking about layering.
Remember about layering objects on the screen GUI infinite just like putting stickers on a piece of newspaper. If you stick 1 sticker on top of some other sticker, information technology volition hide that sticker behind it. Sometimes, however, y'all'll want to arrange stickers in a different manner, peradventure moving those behind to the very front.
Create a Second Image Label
Let's place another image on the screen to demonstrate how layering works.
- Add a new ImageLabel object to the ScreenGui.
- Select the new image label in the Explorer window.
- Click the label'southward Image belongings and upload the
BlueShape.png
paradigm below into your game (right-click the image, select Salve Image As…, relieve it to your computer, and and so navigate to it from Studio).
When the prototype is finished uploading, you should run into the following event:
Change the Label Backdrop
The initial properties don't wait adept for this image, so let'due south prepare them.
- Set BackgroundTransparency to 1 to hibernate the background box.
- Ready Size → X → Beginning to 300.
- Fix Size → Y → Get-go to lx.
- Set Position → Ten → Starting time to 90.
- Set Position → Y → Offset to 30.
That should right everything and the epitome characterization should now look like this:
Change the Layering Order
As you lot can see, the new epitome label was placed backside the first one. If y'all don't like how this looks, you tin can move the object to the front by changing its Z-index.
- Make sure the blue shape paradigm label is nonetheless selected. In the Properties window, at the lesser of the Data section, look for the ZIndex property.
- Change the value to 2. A higher ZIndex value pushes an object in front end of all objects with lower values.
Since the ZIndex of the first label (icon) is 1, our setting of 2 for the blue shape pushes it in front.
Now yous know how to create epitome labels in your game, upload your own images to Roblox, position labels on the screen GUI canvas, and layer them with Z-indexing.
Source: https://developer.roblox.com/en-us/articles/Using-Images-in-GUIs
0 Response to "How Do You Upload Images in Roblox"
Post a Comment