Player is getting stuck when being teleported

So, I’ve been working on my 2D platformer recently and I added a teleport feature that teleports you to a different part in the map. But the thing is, in studio, when you get teleported, the player is just fine. But when I get teleported in the actual game, the player get’s stuck.

In Studio:

In the actual game:

that actually looks like a great game

are there any invisible parts/walls that you may be getting stuck on? And what are you using to move the character?

There are no invisible walls and the controls I’m using are A and D. But I am getting a warning that I can’t click on saying: function: 0xd18362f69f5939c7

Can you show a screenshot of the warning? And by “what” I meant what function are you using to teleport your character in your script

The warning:
fddfds

Here’s the function part of the script:

function Touch(hit)
     script.Parent.TeleportScript.Disabled = true	
     wait(3)	
     if script.Parent.Locked == false and script.Parent.Parent:FindFirstChild("TeleportPad").Locked == false then script.Parent.Locked = time script.Parent.Parent:FindFirstChild("TeleportPad").Locked = false
      local pos = script.Parent.Parent:FindFirstChild("TeleportPad")
    hit.Parent:moveTo(workspace.TeleportPoint.Position) wait() script.Parent.Locked = false script.Parent.Parent:FindFirstChild("TeleportPad").Locked = false end end
    script.Parent.Touched:Connect(Touch)

Ok. So I figured out about why this is happening. This is happening because the script that I was using for the teleport was old and out dated. So I rewrote the script so now it is up to date and the player is no longer getting stuck.

2 Likes