Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a player not move/glitch on teleport?

Asked by 8 years ago
script.Parent.Touched:connect(function(hit)
local plr= game.Players:GetPlayerFromCharacter(hit.Parent)
local humanoid = plr.Character:WaitForChild("Humanoid")

if plr then
wait (0.05)
plr.Character.Torso.CFrame = CFrame.new(game.Workspace.Part2.Position)
plr.Character.Humanoid.WalkSpeed = 0
plr.DevEnableMouseLock = false
plr.Character.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
plr.Character.Torso.CFrame = CFrame.new(game.Workspace.Part2.Position)
humanoid.Changed:connect(function()
humanoid.Jump = false

    end 
        )
    end
end)

This is all I have so far, basically it teleports a player on touch from one brick to another, and makes them unable to move,

What my question is, are there any other ways to assure they don't fall down / glitch? Or anything you guys would suggest to add?

0
You can anchor their torso if that is an option. Lacryma 548 — 8y

Answer this question