Hello, im working on a game and for some characters there is a spawn animation when the character appears, but for some reason, this animation in particular
Offsets the character a bit, and i have no idea what’s causing this
heres the part where the animation plays
task.wait(0.3)
local characterValue = plr:WaitForChild("Values").Character
if characterValue.Value == "Luffy" then
char.IsStunned.Value = true
char.Humanoid.AutoRotate = false
local anim = script.Luffy:Clone()
local track = char.Humanoid.Animator:LoadAnimation(anim)
track:Play()
track.Ended:Connect(function()
char.IsStunned.Value = false
char.Humanoid.AutoRotate = true
end)
task.delay(3,function()
char.IsStunned.Value = false
char.Humanoid.AutoRotate = true
end)
elseif characterValue.Value == "KSI" then -- THE GLITCH HAPPENS HERE
char.IsStunned.Value = true
local anim = script.KSI:Clone()
local track = char.Humanoid.Animator:LoadAnimation(anim)
track:Play()
game.ReplicatedStorage.CustomEvents.SwitchCameraSubject:FireClient(plr, char.Torso)
track.Ended:Connect(function()
char.IsStunned.Value = false
game.ReplicatedStorage.CustomEvents.SwitchCameraSubject:FireClient(plr, char.Humanoid)
end)
else
print("no character found")
end
and yes, i did also try it with only playing the aniamation (without all this other stuff)
and it still was bugged
Any ideas how to fix it? would be very appreaciated !