selectedimage.Value = v.Image.Image
20:32:08.063 - Players.Player.PlayerGui.ScreenGui.ShopFrame.ShopScript:70: bad argument #3 to 'Value' (string expected, got nil)
Shouldn't the Image already be a string??
selectedimage.Value = v.Image.Image
20:32:08.063 - Players.Player.PlayerGui.ScreenGui.ShopFrame.ShopScript:70: bad argument #3 to 'Value' (string expected, got nil)
Shouldn't the Image already be a string??
This is occuring because you're trying to place a nil value into selectedimage.Value. This means v.Image.Image is returning nil instead of the string you want. Check to see if v.Image.Image is the correct way to get the string you want.
Your answer made no sense.. v.Image.Image has a string value, which is the items image. And selectedimage.Value is a stringvalue
Well, that's what I'd think, too, but the error message says otherwise.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Perhaps you should give us extra context to the values.
You could try setting a variable to tostring, so String = tostring(v.Image.Image), then selectimage.Value = String