So i built a teleport script which is in a localscript which is in a GUI at the moment. However to takes forever to be teleported. My console gives me "bad request" errors and they never end until I am teleported. As well as the fact that sometimes the game I want to be teleported to crashed. I wanted to know if there was a better way or more stable way to use this teleport script. I sat once for 3 minutes till the script finally teleported me. Exuse my lack of teleporting players to different games knowledge I just started this.
player = game.Players.LocalPlayer script.Parent.MouseButton1Down:connect(function() game:GetService("TeleportService"):Teleport(334747890, player) end)
I think you defined player wrong. The easiest way I find to define the player is instead of local player, I use
player = script.Parent.Parent.Parent.Parent.Parent
So, I would try to use
player = script.Parent.Parent.Parent.Parent.Parent script.Parent.MouseButton1Down:connect(function() game:GetService("TeleportService"):Teleport(334747890, player) end)
And the reason for your spam was due to you defining player wrong. If you use local player, the game must search for it, taking longer. Meaning you should always use the defining method I used.
player = script.Parent.Parent.Parent.Parent.Parent