I'm making a sword where when you click your WalkSpeed is set to 0, but I still want the player to walk forwards a little to go with the attack animation. I don't know if MoveTo is the best option cause I'm a noobie scripter. I've considered BodyForce, but MoveTo sounds like the better option.
local h = script.Parent.Parent.Humanoid function onActivated() h:MoveTo(Vector3.new(6,0,0) script.Parent.Activated:connect(onActivated)
I'm just trying to get the player to move forward 6 studs when they click. (i guessed on the x,y,z I'll trial and error that later)
I gave the script pretty much every idea I had, which was very few, so any help/ideas are very much appreciated!
EDIT:
local h = script.Parent.Parent.Humanoid function onActivated() h.Parent.Torso.Velocity = h.Parent.Torso.CFrame.LookVector * 100 -- use a value other than 100 if you want more or less boost -- if you are using R15 character you need some other part of the body than Torso -- I have not tested this, again tell me if it doesn't work :D h.WalkSpeed = 0 wait (1) -- start moving again h.WalkSpeed = 16 script.Parent.Activated:connect(onActivated)
Sorry for the delay :/