In light of the recent documentation error I encountered, I decided it would be a good idea to bring up this unexpected behavior of TeleportService | Roblox Creator Documentation.
Currently, inputting a malformed argument into the instanceId
parameter (namely, a numeric ID such as an experience or place ID) will not raise an error. Instead, Roblox will still attempt to follow through with the teleport, causing an incredibly misleading Enum.TeleportResult.Unauthorized
error to occur (what does being unauthorized have to do with an invalid argument)?
This behavior caused a relatively large problem in my game and caused me to waste a great deal of time prior to discovering the documentation error that allowed me to make the mistake in the first place. I was worried that the error may have been outside of my script and was a Roblox-related problem, causing me to wait to release a fix. This caused a slew of problems.
When passing in an invalid argument to TeleportService | Roblox Creator Documentation, (such as passing in an experience or place ID in instanceId
) I expect an exception to occur to inform me of this malformed argument that does not look like a GUID.