i am trying to make inventory, but the script doesn't detect changed values these values are in the buttons in gui and i am using local script.
local Slot1 = script.Parent.Slot1
local Slot2 = script.Parent.Slot2
script.Parent.Slot1.Value.Changed:Connect(function()
print("Changed")
if Slot1.Value.Value == 1 then
Slot1.Image = "http://www.roblox.com/asset/?id=183584653"
else
Slot1.Image = "http://www.roblox.com/asset/?id=1884857885"
end
end)
script.Parent.Slot2.Value.Changed:Connect(function()
print("Changed")
if Slot2.Value.Value == 1 then
Slot2.Image = "http://www.roblox.com/asset/?id=183584653"
else
Slot2.Image = "http://www.roblox.com/asset/?id=1884857885"
end
end)

5 comments
I suggest you add an explanation.
i suggest you read the 4 lines i added
There is no comments whatsoever. I would accept comments or an explanation for a good answer.
It still dossent work. it dosen't even print changed
@krist use getpropchanged @davy not even an idiot doesnt know what "if prop == value" is