How to make a fly command?

Hello, I would like to know how to make a fly command using WASD. I’ve seen some tutorials on YouTube, but they use the mouse. Here is my code.

In main script:

if args[1] == prefix.."fly" then
    		mod.Fly(player, args)	
    	end
end

In module script:

commands.Fly = function(player, args)
--code

end

4 Likes

I made a topic with the script if you want to check it out:

you need BodyVelocity, BodyGyro use a bool value say fly or not / use user input service fire () z q d s or Wasd need ipad ply physique or xbox // ne e or buton unfly
and it change vector to fire client