local dronefacing
function droneMovement(player,keypressed,direction)
if keypressed == "w" then
Bodypos.Position = Bodypos.Position + Vector3.new(0,0,-1)
elseif keypressed == "a" then
Bodypos.Position = Bodypos.Position + Vector3.new(-1,0,0)
elseif keypressed == "s" then
Bodypos.Position = Bodypos.Position + Vector3.new(0,0,1)
elseif keypressed == "d" then
Bodypos.Position = Bodypos.Position + Vector3.new(1,0,0)
end
if direction == "Right" then
drone.CFrame = CFrame.new(Bodypos.Position, CFrame.Angles(math.rad(1,0,0)))
end
if direction == "Left" then
drone.CFrame = CFrame.new(Bodypos.Position, CFrame.Angles(0,0,math.rad(-1)))
end
local dronefacing = drone.CFrame.LookVector
end
droneserver.OnServerEvent:Connect(droneMovement)
COMMUNITY QUESTION
How would i get my part to move in the direction its facing?
1 answer
I recommend using LookVector, RightVector or UpVector https://scriptinghelpers.org/questions/14747/what-is-lookvector-and-how-do-i-use-it
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Yes ik but is it better to use in the if direction statement or the if keypressed statement?