How would I tell if a player teleported to my game via teleport service? I’ve also tried
TeleportService.LocalPlayerArrivedFromTeleport:Connect(function()
--Stuff that happens
end)
but it doesn’t seem to work.
How would I tell if a player teleported to my game via teleport service? I’ve also tried
TeleportService.LocalPlayerArrivedFromTeleport:Connect(function()
--Stuff that happens
end)
but it doesn’t seem to work.
You can use MessagingService if teleporting to other places, and publish the message, otherwise, you can just edit your code to do what you want when player gets teleported
Did you browse the forum before even creating a topic?
I think the solution helps.
i do. That solution doesn’t work.
I’ve tried it. It doesn’t work.
Is it even a Local script or a ServerScript? Try both
The file says local script in ReplicatedFirst
This is my code:
game:GetService("TeleportService").LocalPlayerArrivedFromTeleport:Connect(function()
workspace.CurrentCamera.CameraType = Enum.CameraType.Follow
workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character
game.Lighting.MenuBlur.Enabled = false
game.StarterGui.menu.Frame.Visible = false
end)
Did you try it in game or studio? The article says that this doesnt work on Roblox Studio.
In-game. Teleport doesnt work in studio
game:GetService("TeleportService").LocalPlayerArrivedFromTeleport:Connect(function()
print("user teleported")
end)
Try this, check if it prints since maybe your code was broken and not the Service. Check the console to check if it prints
Yup the service works.
workspace.CurrentCamera.CameraType = Enum.CameraType.Follow
workspace.CurrentCamera.CameraSubject =
game.Players.LocalPlayer.Character.Humanoid
game.Lighting.MenuBlur.Enabled = false
game.Players.LocalPlayer.PlayerGui.menu.Frame.Visible = false
Try replacing your code with that and make sure to check the console again to find the errors easily.
If i add a wait(3)
before it works!
Must be because you were defining them before they were even loaded.
that could be or i have another script to set the camera for a menu and somehow it ran before
Thank you for your help ( i need 30 characters so I gotta write this)