Gun animations work just fine in the animation editor, but they glitch when played in-game?
Asked by
4 years ago Edited 4 years ago
Another odd issue involving animations, but this time it's a weird offset glitch(?) happening on the gun animations I made, it basically makes the gun stay in weird positions during the animation instead of being in the right spot.
This is what the animation is supposed to be like:
https://prnt.sc/uoilyj
This is how the animations is in-game:
https://prnt.sc/uoin3y
This is the animation timeline:
https://prnt.sc/uoinr9
And this is the script that sets the Motor6D:
01 | local function equipGun(player, weapon) |
02 | local char = player.Character |
04 | local newWeapon = weapon:Clone() |
06 | local motor 6 D = Instance.new( "Motor6D" ) |
07 | motor 6 D.Part 0 = char.RightHand |
08 | motor 6 D.Part 1 = newWeapon.Handle |
10 | motor 6 D.Parent = newWeapon |
11 | newWeapon.Parent = char |
P.S: The gun is a model, and the handle is an invisible part connected to the gun's body that is connected to the rest of the gun parts. The animations are mine and they are played on a LocalScript in StarterCharacterScripts
If needed, I'll edit this to answer questions and provide more details.