Hello delightfulrainbow205,
Playing a sound is just the function. It doesn't actually know if the signal got through. If you see it's offline, the sound will not play, despite it giving an indiction you did press the play a sound button:
"Select your missing device or item, then choose Play Sound. If your device is offline, it won't play a sound until it connects to a network."
Just mark your device as lost if you want to put a number or message on the screen. This works if you had a passcode and want to see if you can get it back if found by another person.
If you want to erase your device, you can no longer mark it lost, and everything will be erased, including your Apple ID, so if it is found, it might be used again. At least all your data will be erased.
Thanks.