I’m trying to make an animation where the player attacks with a string.
The string object (Plane) gets copied from ReplicatedStorage
.
I need to position the string where the right hand of the player is, add a Motor6D
object so the animation works, and then plays the animation.
However, when I try to do that, the string just gets stuck in the player’s neck or the wrong position.
game.Players.PlayerAdded:Connect(function(plr)
wait(1)
local Weapon = game.ReplicatedStorage.Weapon:Clone()
Weapon.Parent = workspace
Weapon.Position = Vector3.new(5,5,5)
local primaryPart = plr.Character.HumanoidRootPart
local hand = plr.Character.RightHand
wait(1)
local motor = Instance.new("Motor6D")
motor.Part0 = hand
motor.Part1 = Weapon
motor.Parent = Weapon
end)
I tried removing the Motor6D
, it worked, but the animation didn’t work. I tried setting the string parent to workspace, but it also didn’t work after I added the Motor6D
object. Part0
is the right hand of the user, Part1
is the string.
I expected the string to position itself correctly.