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

Why does my ImageButtonActivated not appear when I click my ImageButton? Can someone fix this too?

Asked by
iVmk3 -143
4 years ago

My script for changing the image (actually its Feahren's)

local Button = script.Parent

local ImageActivated = "rbxgameasset://Images/ImagesButtonActivated"
local ImageNormal = "rbxgameasset://Images/ImageButtonNormal"

local function OnButtonActivated()
    Button.Image = ImageActivated
    delay(4.5, function()
        Button.Image = ImageNormal
    end)    
end

Button.Activated:Connect(OnButtonActivated)
0
Did you put this in a LocalScript or just a regular Script? It should be in a LocalScript. AntiWorldliness 868 — 4y
0
It is in a LocalScript. My problem is when I click my ImageButton, which looks like ImageButtonNormal, It does not change into ImageButtonActivated. Instead it turns to blank. iVmk3 -143 — 4y

1 answer

Log in to vote
0
Answered by
6zk8 95
4 years ago

You need to get the ID since rbxassetid:// uses ids not images. I recommend looking at this: https://developer.roblox.com/en-us/articles/Creating-GUI-Buttons

0
Thanks! Next time I use Images I will use rbxassestid:// instead of just images. iVmk3 -143 — 4y
Ad

Answer this question