Animations delayed and Humanoid walking itself [50% Fixed]

Hi reader,

I’m making a Titanfall 2 styled game and I thought id get the mechs out of the way first. I have made a transfer system where the player gets inside the mech and takes control. However, the animations are really delayed for the player. The mech also runs off when I get out while its moving. I have already fixed the mechs delayed animations but I have not fixed the player running animation and the mech running off.

If anyone knows a fix or a reduce tip. That would be nice.

EDIT: I have fixed the mech running off issue by countering it with a pathfinding AI. Still need to fix player anims though.

2 Likes

what happens to the character once it enters mech? Do you completely destroy Character and replace Player.Character = CustomMech?

2 Likes

If this is done, make sure that you set the network ownership of all parts in the new character to the player. Not doing so could cause lag.

2 Likes

im having an issue with my dead corpse, which is a clone of a ragdolled character, is standing instead of ragdolled like character. do you know why this is happening? I even tried setting network ownership to nil for all the parts with getdescendants. No idea what to do!

1 Like

The character sets move to a folder in replicated storage, then back into workspace and repositioned infront of the mech HRP.

1 Like

I forgot to do this lol.

Edit: Would I need to set the network ownership everytime I change the players character to the mech?

1 Like

yeah that is important to get all the baseparts of mech and :SetNetworkOwner(player). then when they exit the Mech set it back to :SetNetworkOwner(nil). This will make less lag when moving mech.

1 Like

Do you know how to stop the repeating walk animations when I’m not walking? or how to stop the mech from running off?

local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")

-- This stops all animation tracks
for i,v in pairs(Humanoid:GetPlayingAnimationTracks()) do
	v:Stop()
end

-- Get Animate Script and Play Standing Anim.
local Track = Humanoid:LoadAnimation(Character:WaitForChild("Animate"):WaitForChild("idle"):WaitForChild("Animation1"))
Track:Play()

Humanoid.PlatformStand = true -- Freeze Robot

Must re-enable walking with:

Humanoid.PlatformStand = false -- unFreeze Robot