Issue with httpservice

Hello, I’m making a script that generates a random game and prints out the name and some other data.


The only issue is when I change the max random value to bigger than ~4 billion. A lot of times the game’s data that is tries to print out is nil because the game doesn’t exist/has been deleted and it prints something like this “Workspace.Script:10: attempt to index nil with ‘name’”. I know why this happens but don’t know how to fix it.

1 Like

Try to check the game if the game is private

Just check before giving the name variable

if decodedBody.data[1] then

1 Like