It's simple to do it with a player; you just double click. But an NPC can't double click. So how would you cause an NPC to lunge with a sword?
I can't find any tutorials on this, so I was hoping one of you guys could help me.
It's simple to do it with a player; you just double click. But an NPC can't double click. So how would you cause an NPC to lunge with a sword?
I can't find any tutorials on this, so I was hoping one of you guys could help me.
From the LinkedSword Script:
function lunge()
--snip
wait(.25)
swordOut()
wait(.25)
--snip
wait(.5)
swordUp()
--snip
end
function swordUp()
Tool.GripForward = Vector3.new(-1,0,0)
Tool.GripRight = Vector3.new(0,1,0)
Tool.GripUp = Vector3.new(0,0,1)
end
function swordOut()
Tool.GripForward = Vector3.new(0,0,1)
Tool.GripRight = Vector3.new(0,-1,0)
Tool.GripUp = Vector3.new(-1,0,0)
end
swordOut changes the Grip CFrame of the Tool to the 'lunge' position.
swordUp changes it back to the 'up' position.
Then I could just change it from a clicked event to a loop. Thanks!
^ You forgot the connection line :P
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Try CFraming the NPC's arm and sword.