Hi there,
Right now, I’m using the @buildthomas method of freezing character input: How to temporarily disable all character input? - #6 by buildthomas
Which in the context of my code is:
local ContextActionService = game:GetService("ContextActionService")
local FREEZE_ACTION = "freezeMovement"
Player.Character.Humanoid.WalkSpeed = 50 --So the player can more than match the speed of the person they are falling on
ContextActionService:BindAction( --Freezes player input but is incidentally freezing :MoveTo() as well
FREEZE_ACTION,
function()
return Enum.ContextActionResult.Sink -- need to explicitly return this
end,
false,
unpack(Enum.PlayerActions:GetEnumItems())
)
Player.Character.Humanoid:MoveTo(Character.Torso.Position) --Is supposed to move the player to where the player is (gravity is letting them fall, but this mainly allows them to match X and Y position)
Animation1Track:Play() --Plays the jumping animation
wait(Animation1Track.Length)
Animation2Track:Play() --Plays the animation used for mid-fall
while (Character.Torso.Position.Y - TargetCharacter.Torso.Position.Y) > 5 do --Waits until the person is in the proper distance
wait(.1)
end
Animation2Track:Stop() --Stops the falling animation
Animation3Track:Play() --Executes the landing/finishing animation
Player.Character.Humanoid.WalkSpeed = 16 --Resets walkspeed
ContextActionService:UnbindAction(FREEZE_ACTION) --Unfreezes player input
Because I am attempting to play an animation that occurs while the player is falling from a high point onto another player, it was necessary to freeze the input so that the animation didn’t get ruined, and I was using :MoveTo() so that the player would be able to follow the player they were landing on.
The problem is that when using this method, :MoveTo() ends up not working and the player does not move.
Are there any suggestions for how to circumvent the issue, utilizing a better way of locking out player input, etc.?