How Do You Upload Pictures To Roblox?
In the Articles/Intro to GUIs
guide, you 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 Articles/Intro to GUIs
guide, please do and then start!
Let's expand on those concepts and explore how to insert images into the screen GUI space. This is a swell style to display icons, logos, background images, and other cool designs on the screen!
Adding Images to a Screen GUI
Calculation an image to a screen GUI is very like to adding a text characterization.
- In the Explorer window, notice the ScreenGui object (yous tin can use the aforementioned one that yous created in the
Articles/Intro to GUIs
guide) - Insert an
ImageLabel
object. Remember that you can find an object quickly by typing the commencement few letters of its name into the search field.
This will add an empty image label to the top-left corner of the game view.
Upload an Prototype
This placeholder is a good commencement, simply patently we demand a real paradigm to put on the screen. Permit's upload an image now.
- In the Explorer window, select the new ImageLabel object.
- Within the Image section of the Properties window, click on the Image property.
- In the popup window, click Add Image….
- In the next dialog, click the Choose File push. Notice an image on your reckoner, select it, and ostend that you'd like to upload it.
- If you lot wish, type in a dissimilar proper noun 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 Properties
The image is now uploaded and applied to the ImageLabel object. Nonetheless, at that place are some properties which we can change to brand information technology look even ameliorate!
- Aggrandize the Data department in the Properties window if information technology's not expanded already.
- For the BackgroundTransparency value, enter 1. This will make the image label background completely transparent and then that anything backside information technology shows through.
- The size of the image label can be prepare with the Size properties. Offset, alter Size → X → Offset to 80.
- Similarly, change Size → Y → Beginning to 80 to go along the aforementioned proportions.
- The location of the image label tin be gear up with the Position properties. Beginning, change Position → Ten → Beginning to 40.
- Alter Position → Y → Beginning to xx to shift the characterization down a chip.
- Finally, turn the label counter-clockwise a small-scale corporeality past setting the Rotation value to -8.
Layering Images in a Screen GUI
Great! At present you sympathise how to upload images to Roblox and put them on the screen. When you start adding more than than one image, though, you'll probably demand to first thinking about layering.
Think about layering objects on the screen GUI space merely like putting stickers on a piece of newspaper. If you stick one sticker on peak of another sticker, it volition hibernate that sticker behind it. Sometimes, withal, you lot'll want to conform stickers in a dissimilar way, maybe moving those behind to the very forepart.
Create a 2d Paradigm Label
Let'due south place another image on the screen to demonstrate how layering works.
- Add a new ImageLabel object to the ScreenGui.
- Select the new paradigm characterization in the Explorer window.
- Click the characterization'due south Image property and upload the
BlueShape.png
image below into your game (correct-click the paradigm, select Save Prototype As…, salve it to your computer, and then navigate to it from Studio).
When the paradigm is finished uploading, you should see the following result:
Alter the Label Properties
The initial properties don't look good for this prototype, and then let's fix them.
- Set BackgroundTransparency to 1 to hide the background box.
- Set Size → X → Offset to 300.
- Ready Size → Y → Start to 60.
- Set Position → X → Outset to 90.
- Set Position → Y → First to 30.
That should correct everything and the image label should now look like this:
Change the Layering Society
As yous tin can see, the new image label was placed behind the first i. If you don't like how this looks, you tin move the object to the forepart by changing its Z-index.
- Brand certain the bluish shape epitome label is even so selected. In the Backdrop window, at the lesser of the Data section, await for the ZIndex property.
- Change the value to 2. A higher ZIndex value pushes an object in front of all objects with lower values.
Since the ZIndex of the outset label (icon) is 1, our setting of 2 for the blue shape pushes it in front.
Now yous know how to create image labels in your game, upload your own images to Roblox, position labels on the screen GUI sheet, and layer them with Z-indexing.
Source: https://developer.roblox.com/en-us/articles/Using-Images-in-GUIs
Posted by: freemanlichent1970.blogspot.com
0 Response to "How Do You Upload Pictures To Roblox?"
Post a Comment