If nil
is the code for a property that doesn’t have any id, what do you call a property that already has an id? Or so what should I use in this situation?
I’m desperate, please.
If nil
is the code for a property that doesn’t have any id, what do you call a property that already has an id? Or so what should I use in this situation?
It would be ~= which means not equal
Also Image is always a string so instead of checking for nil, check for an empty string “”
if wpn1.Image == "" then
wpn1.Image = "http://www.roblox.com/asset/?id=15815483256"
elseif wpn1.Image ~= "" then
end
Thanks, I definitely did not know that.
If the image has no current asset id
this would be the one to function right?
if wpn1.Image == "" then
Yes, it would be “” if it has no current asset id
Is this considered an asset id?
Because for me it’s working the opposite, it prints “Image already has an id”
if wpn1.Image == "" then
wpn1.Image = "http://www.roblox.com/asset/?id=15815483256"
elseif wpn1.Image ~= "" then
print("Image already has an id")
Yes, that would count as an asset id, you can see if the image property is empty under the properties window
You can just clear the image property to an empty string
Oh! Thanks for helping me the second time, I thought it was the default property and it results as a nil property. Thanks 100
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.