TeleportService settings persist through Studio play test sessions

Data set with the TeleportService:SetTeleportSetting method during a play test session in Studio is not cleared upon stopping the game and testing again. Data from previous play test sessions is retrievable with TeleportService:GetTeleportSetting.

This feels unintentional because game state from one play test session shouldn’t carry over to another, all tests should start from a blank slate, otherwise the user will experience unexpected results while debugging code using these methods.

Bug repro file: TeleportService_Setting_Bug.rbxl (16.6 KB)

Steps:

  1. Open the provided repro file.
  2. Click Play and see that the TextLabel on top is “nil”.
  3. Click the “Save data button” which will save the teleport setting.
  4. Click Stop.
  5. Click Play.
  6. The saved data from the previous play session will appear on the TextLabel.

Additionally: The documentation for TeleportService:GetTeleportSetting claims that the method will return nil when there is no data saved, but this is not the actual behavior. This method returns no value at all, or void. Other members of the Roblox API actually return the value nil, such as FindFirstChild. Typically, this is indistinguishable in Lua, but the problem can be demonstrated here:

tostring(game:GetService("TeleportService"):GetTeleportSetting("Testing"))

--> 02:45:23.891 - bad argument #1 to 'tostring' (value expected)
4 Likes

It’s this kind of bugs with Universes and TeleportService that prevent me from testing and releasing a game which is built around or utilizes these features.

This is the only way to properly test saving/loading Teleport settings in Studio as you cannot teleport between places in Studio. Please do not patch this without providing a proper way to do universe/teleport testing in Studio.

Thank you for submitting this report. We are currently reviewing all bug reports to ensure we have not overlooked any ongoing issues. Since this issue was reported over two years ago, can you please confirm you are still experiencing the problem? If so, please respond to this thread, and we will investigate. If we do not receive any response within 30 days, we will consider this matter resolved. Thank you.