Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Equation to make the velocity move you to YOUR torso's right?

I am trying to make a dodge type move, and i am having trouble making the torso's velocity go to it's right.

I do not know what math i need to do and nothing seems to work, I tried CFrame, vectors..nothing has worked so far. This is what I have so far.

elseif input.KeyCode == Enum.KeyCode.D then 
			print('pressed D')
			local torso = player.Character.Torso
			local bp = Instance.new('BodyVelocity', torso)
			bp.MaxForce = Vector3.new(5000,5000,5000)
			bp.Velocity =  CFrame.new(20,0,0) * torso.CFrame.lookVector
			wait(.8)
			bp:Destroy()
		end

1 answer

✓ Accepted answer
bp.Velocity =  (Torso.CFrame * CFrame.new(20,0,0)).p

1 comment

0

omg ur even here o,O

This discussion is preserved as it was. New answers, comments, and votes are closed.