local Players = game:GetService("Players") local room = workspace:WaitForChild("GravityRoom") local active = {} local function clear(player) local entry = active[player] if entry then entry.force:Destroy(); entry.attach:Destroy(); active[player] = nil end end Players.PlayerRemoving:Connect(clear) while room.Parent do local half = room.Size / 2 for _, player in Players:GetPlayers() do local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart") local p = root and room.CFrame:PointToObjectSpace(root.Position) local inside = p and math.abs(p.X) <= half.X and math.abs(p.Y) <= half.Y and math.abs(p.Z) <= half.Z if active[player] and (not inside or active[player].root ~= root) then clear(player) end if inside then if not active[player] then local attach = Instance.new("Attachment", root) local force = Instance.new("VectorForce", root) force.Attachment0, force.RelativeTo = attach, Enum.ActuatorRelativeTo.World force.ApplyAtCenterOfMass = true active[player] = {root = root, force = force, attach = attach} end active[player].force.Force = Vector3.new(0, root.AssemblyMass * workspace.Gravity * 0.65, 0) end end task.wait(0.1) end for player in pairs(active) do clear(player) end