#imagelabel decal isn't showing up
1 messages · Page 1 of 1 (latest)
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
Is the image object not showing up at all on the script or does it show a blank image?
blank image
i tried using different decals but only some worked
Are you sure those ids are for the image, not the decal?
i don't understand 💀
wdym
ohw
When you put the ids in your script, did you copy them form the decal?
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
manually into the icon label?
Select the image object in the editor, go to where you put the image id and paste the thing you have
ohhhh
Then copy the id and put it in your code
** You are now Level 5! **
Paste in just the number
i did and i got this
You put in this
And got this?
Not weird
the numbers are always one digit less
Put this in your script as the id
Yes, decals and images have different ids, even if they show the same texture
i see
local unmutedIcon = "rbxassetid://202000937" -- unmuted
ok i did it for both
still doesn't work
Alright let me try
** You are now Level 6! **
kk
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)
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
i copied everything
just addefd the aspect ratio constraint so its not ugly and stretched
try putting print statements in every function to see where the problem is from
at the value change print the muteValue
ok so
it appears to be changing the decal
works fine
but its not showing up on the screen
when you first load into the game does it show up as the default value for the icon?
did you set an image in the editor?
yeah i set it to the unmuted id
and when you load in that icon disappears?
are you sure there aren't conflicting scripts?
use ctrl+shift+f to search for something accross all scripts
and see if any scripts are referencing the gui
even when i set the id outside of testing it still doesnt appear
well im not sure what that might be