#imagelabel decal isn't showing up

1 messages · Page 1 of 1 (latest)

untold wraith
#

not sure if this is because of my script or maybe a setting i have toggled on thats not allowing it to show up

#
local muteValue = player:WaitForChild("IsMuted")

local button = script.Parent
local icon = button:WaitForChild("Icon") 

local mutedIcon = "rbxassetid://202000871"    --  muted
local unmutedIcon = "rbxassetid://202000938"  --  unmuted


-- set icon
icon.Image = muteValue.Value and mutedIcon or unmutedIcon

button.MouseButton1Click:Connect(function()
    muteValue.Value = not muteValue.Value
    icon.Image = muteValue.Value and mutedIcon or unmutedIcon
end)

muteValue:GetPropertyChangedSignal("Value"):Connect(function()
    icon.Image = muteValue.Value and mutedIcon or unmutedIcon
end)


#

uhh idk how to do it

#

this is my layout its pretty straightforward

terse totem
#

Is the image object not showing up at all on the script or does it show a blank image?

untold wraith
#

i tried using different decals but only some worked

terse totem
#

Are you sure those ids are for the image, not the decal?

untold wraith
#

i don't understand 💀

#

wdym

#

ohw

terse totem
#

When you put the ids in your script, did you copy them form the decal?

untold wraith
#

no i just copied it from the link

#

202000871

#

and the other one

terse totem
#

Alright try this

#

Take the id, put it manually into the image, then copy the thing that comes up after it

#

And check if it's different from the id in your script

untold wraith
#

manually into the icon label?

terse totem
#

Select the image object in the editor, go to where you put the image id and paste the thing you have

untold wraith
#

ohhhh

terse totem
#

Then copy the id and put it in your code

pseudo locustBOT
#

studio** You are now Level 5! **studio

untold wraith
#

ok i get this

#

rbxassetid://202000870

#

is this it or

terse totem
#

Paste in just the number

untold wraith
#

i did and i got this

terse totem
#

Then copy the id you have after that and paste it here

#

Alright

terse totem
terse totem
untold wraith
#

yep

#

its weird

terse totem
#

Not weird

untold wraith
#

the numbers are always one digit less

untold wraith
#

is this normal?

terse totem
terse totem
untold wraith
#

i see

#
local unmutedIcon = "rbxassetid://202000937"  --  unmuted

#

ok i did it for both

#

still doesn't work

terse totem
#

Alright let me try

pseudo locustBOT
#

studio** You are now Level 6! **studio

terse totem
#

Somet

#

hing

untold wraith
#

kk

terse totem
#

try this

#
local player = game.Players.LocalPlayer
local muteValue = player:FindFirstChild("IsMuted")
if not muteValue then
    muteValue = Instance.new("BoolValue", player)
    muteValue.Name = "IsMuted"
    muteValue.Value = false
end

local button = script.Parent
local icon = button:WaitForChild("Icon") 

local mutedIcon = "rbxassetid://202000870"    --  muted
local unmutedIcon = "rbxassetid://202000937"  --  unmuted


-- set icon
icon.Image = muteValue.Value and mutedIcon or unmutedIcon

button.MouseButton1Click:Connect(function()
    muteValue.Value = not muteValue.Value
    icon.Image = muteValue.Value and mutedIcon or unmutedIcon
end)

muteValue:GetPropertyChangedSignal("Value"):Connect(function()
    icon.Image = muteValue.Value and mutedIcon or unmutedIcon
end)
untold wraith
#

k ty

#

lemme check

#

still seems to not work

#

ok ill show you everything

#

this is in startergui

#

and this is in sss ```game.Players.PlayerAdded:Connect(function(player)
local muteValue = Instance.new("BoolValue")
muteValue.Name = "IsMuted"
muteValue.Value = false
muteValue.Parent = player
end)

#

basically defines mute or unmute

terse totem
#

i copied everything

#

just addefd the aspect ratio constraint so its not ugly and stretched

untold wraith
#

and is it working for you

#

?

terse totem
#

yes

#

try removing the code that's defining the mute value

untold wraith
#

k

#

removed it, mute still works but the decals isnt showing up still

terse totem
#

try putting print statements in every function to see where the problem is from

#

at the value change print the muteValue

untold wraith
#

ok so

#

it appears to be changing the decal

#

works fine

#

but its not showing up on the screen

terse totem
#

when you first load into the game does it show up as the default value for the icon?

untold wraith
#

no i didn't set it to anything

#

i can do that though

#

wait

#

yep still a blank

terse totem
#

did you set an image in the editor?

untold wraith
#

yeah i set it to the unmuted id

terse totem
#

and when you load in that icon disappears?

untold wraith
#

its just blank

#

theres nothing

terse totem
#

are you sure there aren't conflicting scripts?

untold wraith
#

i doubt it

#

lemme check

#

hold on

terse totem
#

use ctrl+shift+f to search for something accross all scripts

#

and see if any scripts are referencing the gui

untold wraith
#

even when i set the id outside of testing it still doesnt appear

terse totem
#

well im not sure what that might be

untold wraith
#

💀

#

i tried remaking it and it kinda worked

#

i genuinely have no idea why it wasnt working before

#

gimme a sec

#

it works 😭