So I've been stuck on this seemingly simple problem.I'm trying to make it so when a player's health hits 1,a death animation is played.But,I can't seem to be able to figure out how to rotate the player to fall on its face.Here is the code for the localscript:
while game.Players.LocalPlayer.Character==nil do
wait(0.1)
end
local debounce=false
local Character=game.Players.LocalPlayer.Character
local Humanoid=Character.Humanoid
Humanoid.HealthChanged:connect(function(Health)
if Health==1 and debounce==false then
debounce=true
Humanoid.PlatformStand=true
--CFrame.
wait(0.2)
Character.Torso.CFrame=CFrame.new(Character.Torso.Position)*CFrame.Angles(math.rad(-90),Character.Torso.Rotation.Y,Character.Torso.Rotation.Z)
Character.Torso.Anchored=true
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=450725919"
local animTrack = Humanoid:LoadAnimation(animation)
animTrack:Play()
wait(1.3)
animTrack:AdjustSpeed(0)
wait(1)
animTrack:AdjustSpeed(1)
wait(0.66)
--animTrack:Stop()
animTrack:AdjustSpeed(0)
--Humanoid.Animator:Remove()
--wait(3)
--Character.Torso.Anchored=false
--Humanoid.PlatformStand=false
--debounce=false
end
end)
How would I make it so the player literally rotates forward on to its face?I spend 3 hours googling this and trying to figure it out,yet I can't seem to be able to find a solution...

1 comment
I've tried every possibly CFrame.Help?