Cant get data from LocalPlayerArrivedFromTeleport

  1. What do you want to achieve? Keep it simple and clear!
    Cant get data from LocalPlayerArrivedFromTeleport, no prints at all

  2. What is the issue? Include screenshots / videos if possible!

local TeleportService = game:GetService("TeleportService")

TeleportService.LocalPlayerArrivedFromTeleport:Connect(function(Screen, teleportData)
	if teleportData then
		print(teleportData)
	else
		print("nothing")
	end
end)

Using this, and not getting any prints, I need the teleportData, has a string i want to move between places

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Tried looking at other posts, but they need help with the screen instead of data

1 Like

It’s possible that the code is not working because you’re trying to access LocalPlayerArrivedFromTeleport from a LocalScript. LocalPlayerArrivedFromTeleport is a server-side event, so it may not be accessible from a LocalScript.

You can try moving this code to a Script that’s stored in some other location, like the ServerScriptService, and see if that helps.

Alternatively, you could try using TeleportService.OnTeleport instead. This event fires both on the server and the client, and it also passes the player’s Roblox character instance as an argument, which you can use to get information about the player. So, like this

TeleportService.OnTeleport:Connect(function(player, destination)
    if player == game.Players.LocalPlayer then
        print(destination.PlaceId, destination.ServerId)
    end
end)

local player is only able to be used in client side i thought