Floating blocks similar to the game Coalesce

I’ve been trying to figure out how I would make those kinds of blocks/bricks scripting wise, as I tried using line forces to no avail. They sit under your character and continue to push you upwards, and if they get knocked away, they come back.

Wouldn’t you be able to use Align Position and or Align Orientation and set it to the Players HumanoidRootPart

I thought this one was very interesting, I got confused on how to do this so I went to the Roblox Assistant to see what it said and here is what it talked about:

  1. Create a part (a brick or block) that will be the base of your structure. This part should have a fixed position and size.

  2. Create a script that will control the movement of this part. This script should use the Anchored property to prevent the part from moving on its own.

  3. When the player collides with the part, you can apply a force to it using the Force property. This will push the part away from the player.

  4. To make the part return to its original position, you can use a Tween or a script that gradually moves the part back to its original position over time.

It also suggested you add a code:

-- Create the part
local part = script.Parent

-- Set the part to be unanchored so it can move
part.Anchored = false

-- Create a function to apply a force to the part
local function applyForce(player)
    local force = Instance.new("Force")
    force.Parent = part
    force.Force = Vector3.new(0, 10, 0)  -- Push the part upwards
end

-- Create a function to move the part back to its original position
local function movePartBack()
    part.Position = Vector3.new(0, 0, 0)  -- Move the part back to its original position
end

-- Listen for collisions with the part
part.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        -- The player has collided with the part, apply a force to it
        applyForce(hit.Parent)
    end
end)

-- Listen for the part being knocked away
part:GetPropertyChangedSignal("Position"):Connect(function()
    if part.Position ~= Vector3.new(0, 0, 0) then
        -- The part has been knocked away, move it back to its original position
        movePartBack()
    end
end)

This code creates a part that can be pushed away by the player, and it will return to its original position if it’s knocked away. You can customize the force and movement to fit your specific needs.

I probably should’ve been more clear; the blocks float underneath you and fly upwards underneath your character. Think of them being gravitated towards you.
Here is the link to the game’s trailer as I can’t get in game footage right now. https://www.youtube.com/watch?v=GeVm0Ry9Zzw&t=6s

your best bet would be to use something like AlignPosition and have a script that checks how close a player is to the cube and if they are close enough connect the attachment and then either in the explosion or the cube script its self detect when the explosion hits the cube and then disconnect the attachment and pause the “checkNearestPlayer” function for a couple of seconds

Now that ive thought about it considering the game was made in 2014 they most likely used body movers (which are deprecated) through tests ive done with them before they do behave a bit differently to lineforces and such so maybe instead try using RocketPropulsion with part:GetMass() * Workspace.Gravity (or just set the part to massless) or BodyPosition