So i made a local script in startergui, whenever i would run the game it would print all the checks but never changes the image, how do i fix that? heres the script:
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local ImageLabel = PlayerGui.MainGui2.InventoryGui.Templates.Item.ImageLabel
local ItemName = PlayerGui.MainGui2.InventoryGui.Templates.Item.ItemName
ItemName:GetPropertyChangedSignal("Text"):Connect(function()
print("Check 1")
if ItemName.Text == "Wood" then
print("Check 2")
ImageLabel.Image = "rbxassetid://6421015650"
end
end)
Could it be that you’re using decalid rather than imageid? When you change the image, does it show the placeholder image or does it not change anything at all. Try placing an image in the imagelabel and then play test and type Wood and see what happens, cause if everything should be working, it’s msot likely that you’re using DecalId rather than ImageId
local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local ImageLabel = PlayerGui.MainGui2.InventoryGui.Templates.Item.ImageLabel
local ItemName = PlayerGui.MainGui2.InventoryGui.Templates.Item.ItemName
ItemName:GetPropertyChangedSignal("Text"):Connect(function()
print("Check 1")
if ItemName.Text == "Wood" then
print("Check 2")
ImageLabel.Image = "rbxassetid://6319951708"
end
end)