Hello, im currently making a npc that is sitting and walks somewhere when the player touches the part. My problem is that i want those one animation to stop and the other to play immediately but instead of that it stops the idle animation and then you get a roblox t pose and after that the second animation plays.
local Part = script.Parent
local NPC = script.Parent.Skeleton
local Animation = script.Parent.Guyscare
local Idle = script.Parent.IdleAnim
local animat = NPC.Humanoid:LoadAnimation(Idle)
animat:Play()
Part.Touched:Connect(function(Hit)
local Anim = NPC.Humanoid:LoadAnimation(Animation)
local Player = game:GetService("Players"):GetPlayerFromCharacter(Hit.Parent)
if Player then
Anim:Play(1)
animat:Stop(0)
Anim.Stopped:Wait()
script.Parent:Destroy()
end
end)

1 comment
Thank you very much! I'll try this