Anti-Gravity room effect not working properly

I am trying to make an Anti-Gravity room similar to that in Innovation Labs by @madattak. I tried using Vector Forces which has gotten the player to be tossed around the room like they should be, but the effect is really extreme with the player being flung out of the map after just 30 seconds in the room.

Here is my code:

	local char = part.Parent
	if char.ClassName == "Accessory" then
		char = part.Parent.Parent
	if char:WaitForChild("HumanoidRootPart") then
		local attachment ="Attachment")
		attachment.Name = "VectorAttachment"
		attachment.Axis =,0,0)
		attachment.SecondaryAxis =,1,0)
		attachment.WorldAxis =,0,0)
		attachment.WorldSecondaryAxis =,1,0)
		attachment.Parent = char.HumanoidRootPart
		local vectorForce ="VectorForce")
		vectorForce.Archivable = true
		vectorForce.Enabled = true
		vectorForce.ApplyAtCenterOfMass = true
		vectorForce.Force =, workspace.Gravity / char.HumanoidRootPart:GetMass() , 0)
		vectorForce.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
		vectorForce.Parent = char
		vectorForce.Attachment0 = attachment
		char.Humanoid.Sit = true

Is there any way to make the effect more like the gravity room in Innovation Labs, or at least less extreme?

Does anyone know how to fix this?

Have you tried changing the gravity directly? If I’m not wrong you are able to change the gravity locally

1 Like

Changing the workspace gravity doesn’t work from what I’ve tried.

You’re adding forces every time a character touches an anti-gravity brick, and those forces add up to create one massive force.
Edit for clarification: .Touched will fire multiple times as a character walks over the part, which leads to the script adding an indefinite number of forces to said character. It might add one force, it might add a hundred. .Touched on its own is not a reliable way to do something once.

Instead, you should be using a “zone” part to represent your anti-gravity room. Apply the anti-gravity force only when a character has entered the zone, and remove the force once they leave the zone. You can use ZonePlus to detect when a character has entered or left the anti-gravity room, or use your own zone implementation.

1 Like