So this a tough one but is there any way to make custom textures in-game then you can put on a part?
Basically, you would be making pixel art on a UI then it would upload onto a part.
I’m sorry but it’s not possible. The most recommended ways to make a texture are making one in blender and then export it, or more much simply, download a drawing app and draw the texture
I did it. Just use SurfaceGui.
This door is not a decal, it’s a surfacegui.
The windows and doors on these buildings are also frames inside a surfacegui.
These labels are not decals because decal’s text can become blurred, so it’s surface gui; the vcr have ImageLabels on top of black frames.
Here’s a texture with surfacegui using UIListLayout
Cool, yeah, you can use surface guis, but I wouldn’t call it a real texture. You’ve been really clever and able, tho. Have a nice day
The ImageButton class has a property called ImageRectOffset
that can be used to offset the image displayed by the button.
ImageRectOffset
is a Vector2
value and is used in the order of (x,y).
The offset is not very well documented, but works as follows:
Offsetting the image left and up by 10 pixels will subtract 10 pixels from the width and 10 pixels from the height of the image.
Offsetting the image right and down by 10 pixels will add 10 pixels to the width and will add 10 pixels to the height of the image.
My best guess is that the AbsoluteSize
of the ImageButton
is used to determine the number of pixels to offset the image.
So, if you want to offset by 10 pixels and the AbsoluteSize
is Vector2.new(20,20)
, then the offset will be 10 pixels.
However, if you want to offset by 10 pixels and the AbsoluteSize
is Vector2.new(10,10)
, then the offset will be 5 pixels.
Here is an example of how you can use it, from the Roblox Wiki, which was taken from this question:
local button = Instance.new(“ImageButton”)
button.Image = “rbxasset://textures/ui/Settings/MenuBar/GoldCoin.png”
– Center the image
button.ImageRectOffset = Vector2.new(8, 8)
button.ImageRectSize = Vector2.new(16, 16)
The above code offsets the image by 8 pixels.
local button = Instance.new(“ImageButton”)
button.Image = “rbxasset://textures/ui/Settings/MenuBar/GoldCoin.png”
– Center the image
button.ImageRectOffset = Vector2.new(-8, -8)
button.ImageRectSize = Vector2.new(16, 16)
The above code offsets the image by 8 pixels in the other direction.