#TeleportService:GetLocalPlayerTeleportData() returning nil
1 messages · Page 1 of 1 (latest)
The teleportdata parameter is nil because you're passing it as the last argument, but TeleportToPrivateServer doesn't have a teleportdata parameter at that position . The signature is:
TeleportToPrivateServer(placeId, accessCode, userIds, spawnName, teleportData, customLoadingScreen)
Your call has contestants where userIds should be, then nil for spawnName, then teleportdata, so it's actually being passed correctly if your argument order matches. Double-check you're reading it on the other side with TeleportService:GetLocalPlayerTeleportData() inside a LocalScript, not a Script. That function only works client-side, and if called server-side it'll always return nil.
Also worth noting, the data has to be JSON-serialisable. If your dictionary has non-string keys, Instance references, or anything odd, it'll silently drop to nil on arrival.
yeah, I made ai improve it bcs my grammar kinda sucked, then it added a bunch of stuff