Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sword Rotation gets messed up?

Asked by 9 years ago

The sword Rotation gets messed up when I try to sheathe it while walking. If I sheathe it standing still it works fine like this

https://gyazo.com/74c616449fd7f56b07722bd07e6e3119

But If I walk then the sword rotation gets messed up like this

https://gyazo.com/a608a3b138a900c9a45a952527bac02a

Code:

01equipAnim = script.Parent:WaitForChild("EquipAnim5")
02idleAnim = script.Parent:WaitForChild("IdleAnim3")
03sheatheAnim = script.Parent:WaitForChild("SheatheAnim")
04player = game.Players.LocalPlayer
05rootPart = player.Character:FindFirstChild("HumanoidRootPart")
06equipped = true
07 
08rightArm = player.Character:FindFirstChild("Right Arm")
09katana = player.Character.Katana
10 
11 
12function drawSword(inputObject, gameProcessedEvent)
13    if inputObject.KeyCode == Enum.KeyCode.E then
14        if equipped then
15            equipped = false
View all 83 lines...

How do I make it so the rotation doesn't get messed up when sheathing while walking?

0
Should I just make it so the player's walkspeed is 0 when equipping and sheathing? NovaMagic 73 — 9y
0
by setting player walkspeed to 0 when sheating sword seems to have fixed it but if anyone knows how to fix it without changing the walkspeed, I'd love to hear it NovaMagic 73 — 9y

Answer this question