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
Are you using raycasting?
No that's a bodyvelocity, look at line 01
@Mr_Unlucky No... Should I?
this is only part of the script too, in case you think it's because I left something out
maxForce is not a property, MaxForce is. velocity is not a property either, Velocity is though.
they both work without capitalization so therefore...
so none of yall got a solution..? yall just gonna nitpick at the other things and script only to be proven wrong..
They're deprecated, and deprecated items should not be used in new work. http://robloxdev.com/articles/Deprecation
oh lol.. i feel dumb
What does the projectile look like? Not that it matters much but I'm having trouble visualizing a solution.
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...