Problems with flight

I have recently written a script that makes the player fly and it sort of works. The only problem is that you can’t move and you just keep going up. Any suggestions on how to fix this?

			local char = plr.Character
			local hum = char:WaitForChild("Humanoid")
			local Torso = char:WaitForChild("LowerTorso")
			
			local BV = Instance.new("BodyVelocity",Torso)
			BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
			wait()
2 Likes

By default, BodyVelocities have their velocity set to (0, 2, 0), which is why you only fly upwards; you could set this to something else in order to move the character in a different direction. I’m not entirely sure how you might enable players to control the direction in which they’re flying though.

Do you mind helping me rewrite my script?

You need to get inputs from the player to control the forces.
Try looking into some free model wings from the Toolbox to see how they do it.

I would suggest using something like Humanoid.MoveDirection and changing the Velocity using it.

You can try to use BodyForce so that the player can move


local list = script.Parent:GetChildren()
for i = 1, #list do
	part = list[i]
	if part:IsA("BasePart") then
		force = force + part.Mass
	end
end
bodyforce = Instance.new("BodyForce",script.Parent.HumanoidRootPart)
bodyforce.Force = Vector3.new(0,(force*workspace.Gravity),0)
[/quote]
this should work , put it in starter character scripts
1 Like