What I want to do is make a Changed function. The function will fire when a value in a player's inventory is changed, but the problem is that the value doesn't constantly exist in the player's inventory. So putting something like this inside a localscript:
function change()
--code here
end
game.Players.LocalPlayer.Value.Changed:connect(change)
will break since sometimes the value is nil. And when I put something like this:
function change()
--code here
end
if game.Players.LocalPlayer.Value then
game.Players.LocalPlayer.Value.Changed:connect(change)
end
the function just doesn't work. So, how would I format this?

1 comment
Just so you know using Value as a value name will only serve to confuse you