I am trying make it where when you activate a tool, a projectile is shot out and you can control it with your mouse for several seconds. The controlling of the projectile works but I want to make it so the projectile always faces in the direction it is headed.

	local y = Instance.new("BodyVelocity")
	y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
	y.velocity = mouse.Hit.lookVector*110 
for i = 1,60 do
	y.velocity = mouse.Hit.lookVector*110 
		x.Rotation = mouse.Hit.lookVector
		wait()
	end
	y.maxForce = Vector3.new(1e8, 1e8, 1e8)
	y.velocity = mouse.Hit.lookVector*110 

11 comments

0

Are you using raycasting?

0

No that's a bodyvelocity, look at line 01

0

@Mr_Unlucky No... Should I?

0

this is only part of the script too, in case you think it's because I left something out

0

maxForce is not a property, MaxForce is. velocity is not a property either, Velocity is though.

0

they both work without capitalization so therefore...

0

so none of yall got a solution..? yall just gonna nitpick at the other things and script only to be proven wrong..

0

They're deprecated, and deprecated items should not be used in new work. http://robloxdev.com/articles/Deprecation

0

oh lol.. i feel dumb

0

What does the projectile look like? Not that it matters much but I'm having trouble visualizing a solution.

0

The projectile is an electric dragon head that you can control for a few seconds. I’ve tried x.Orientation = x.BodyVelocity.Velocity but it just turns the head in an odd way so I’m not sure if I have to play around with that or what...