Unable to cast value to Objects

I am trying to make a script that teleports you to a tutorial world if it is your first time joining.
The issue is when someone joins for the first time, the error “Unable to cast value to Objects” appears, happening at line 21 (TeleportService:TeleportAsync(123548646121048, plr))

I looked for solutions on documentation, the DevForum, everywhere I could access, but it didn’t work at all.

TeleportService:TeleportAsync can’t be the problemm, since this exact code is used in every other one of my games with queues, so it isn’t the problem.
123548646121048 is the exact code, and plr is defined using game.Players.PlayerAdded:Connect(function(plr)
This is all in a normal script, not a LocalScript, since data stores don’t work on LocalScripts.

3 Likes

Why don’t you just use TeleportService:Teleport() ?
TeleportAsync is just for switching servers i’m pretty sure.

1 Like

and now it works. thank you for helping, i’m going to work on making the tutorial

1 Like

That’s great to hear, glad i was able to help!

2 Likes