I have a module script that stores information about nextbots in my game (png images that chase you) and it stores 1 image and 2 sound IDs. It then picks a random item from that table and spawns it. There's the problem, I have no way of knowing if the asset IDs are valid or not unless I play the game and spawn every single nextbot. I know how to check if an asset ID is valid (via script) but how do I check if my game has access to it? I remember there being a way to do this but I completely forgot and every method I have found so far only checks if it's valid, not if I have access to it.
#How to check if an asset ID is valid and the experience has access to it.
1 messages · Page 1 of 1 (latest)
for the image, make a brick in the workplace and simply try putting the image upon the brick. if it loads, you know it works. if it doesnt, just simply upload the image from your computer into the decal and roblox will create a working one for you
a similar process works for the sound—simply make a brick and put the sound id into it. if it doesnt play, you know it doesnt work. if youre iffy, try using an id from the toolbox that works undoubtedly
ik i was just wondering if there was a way of doing it via script yk so if in an actual game an asset is invalid if just doesnt spawn
there is ways to do it via script, but thats simply more complicated, of course. if youre only concerned about the ids functioning or not, then testing them through a script is a bit unnecessary
** You are now Level 5! **
yes, but lets say the creator of an asset im using gets banned, i cant just test every id every single time i go on studio (even if i did that theres still risks). trust me for what its for, doing it via script is very necessary. its actually crucial
there are a lot of ids i cant test them all
ik but u say theres away w script so what is it?
yes it works but its way too much hassle when u could just get a script to do it for u
ok fine then. what if i have players able to make their own nextbots, am I supposed to test every single possible id? what is the script?