What’s up guys! I’ve been working on a roblox model that’s kinda of like a computer. You press the button and some text comes up regarding the button you press. This is what it looks like
This is what happens with the model itself I just wanted to know if it’s possible to make it so whenever I click the buttons it would load a decal instead. Any help or feedback would be nice. Thank you!
You actually don’t need a decal to display images. GUIs also have ImageLabels that work the same way as decals, and has the features of a UIObject. Here’s the reference to help you:
Here’s some pseudo code, assuming it’s in a localscript under one button, and the GUI is inside the player’s PlayerGui folder:
-- Locate the objects: (modify the paths to your UI if needed)
local ImageLabel = script.Parent.Parent.ImageLabel
local Button = script.Parent
-- The image ID that the button will insert:
local ButtonImage = “rbxassetid://ImageIDHere”
Button.MouseButton1Click:Connect(function()
-- When your button is clicked, change the ImageLabel:
ImageLabel.Image = ButtonImage
end)
This code runs on the client, so make sure to clone the GUI to the player, or put it in StarterGui. This is visible to the player only.