No, for some reason the massless property doesn’t effect the part’s gravity, although that’d be incredibly useful
Using a body mover/vector force is the only solution atm (I’d suggest vector force). Could you provide some context to the situation so we can figure out what is causing it to fly off? My guess is the part’s velocity is already set to something before you add the vector force. This would just cause the part to move in that direction forever. If you want to make sure it doesn’t move when you add the vector force, try setting Velocity and RotVelocity to Vector3.new(0,0,0)
No, I set the velocity to a vector 3 of 0,0,0 after making the anti gravity force
Massless is just for mechanisms where the root part has a mass, the connected parts with Massless true don’t add to the total mass, e.g. bodykit for a car where you don’t want it to affect the handling.
The usual method that uses a BodyForce works for me; perhaps you’ve done it incorrectly. Could you try inserting this Script into the Part to see if it works as expected?:
local parent = script.Parent
local bodyForce = Instance.new("BodyForce")
bodyForce.Force = Vector3.new(0, parent:GetMass() * workspace.Gravity, 0)
bodyForce.Parent = parent
When I was working on solving a problem with establishing a way a player could be made to go up and down via q and z keys and hover when required I had to add a variation on the mass * gravity setting.
The variation I used was to multiply the calculation by 0.999972 and discovered by experimentation.
I have just tried the rbxl I created and its still works fine and the hover is stable for my specific setup.
it did not work, as i stated earlier this is exactly what i tried, but nonetheless i still inserted this script, and still the part flew away
Is there anything else altering properties of the Part? Does gravity change mid-game?
Do you have customPhysical Properties Enabled?
Anchoring means that the object is no longer affected by anything, and from what I can tell, he wants it affected by everything but gravity, so it’s not an option.
Gravity stays constant
No, i do not have customphysicalproperties enabled
Can you send us a visual of the part flying off?
Is that your head? My guess is that your problem is either animation or humanoid related.
That problem is probably if not definitely the issue of the humanoid. It’s his head. I haven’t had issues with this so I can’t really help out with this.
Try using a body velocity.
local bv = Instance.new("BodyVelocity")
bv.Velocity = Vector3.new(0,0,0)
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)--Play around with this
bv.P = 9000--Play around with this
bv.Parent = part
Hope I could help.
See this post
BodyVelocity is legacy and is replaced by VectorForce. Setting its force.Y to mass * gravity should do the trick.
read the original post, thank you!