Hi!
Today I was using BodyVelocity to create a jet that a player can use to move in the direction of their mouse before the BodyVelocity being destroyed. However, I've run into an issue with changing the Velocity of the BodyVelocity object to move in the direction of the mouse.
It works like a dream in Studio, but when I try it in game, I get this mess.
Here is the code for the velocity:
for i = 1, 20 do BodyVelocity.velocity = (Mouse.Hit.p - Character.Torso.Position).unit *80 Character.Torso.CFrame = CFrame.new(Character.Torso.Position, Mouse.Hit.p) wait(0.1) end
For some reason, this code works perfectly in Studio, but in game, this code refuses to run, meaning all of the code below it never runs, and I remain moving upwards.
What I want to know is why this happens, and how I can fix it.
Thanks!