How to make a part follow you

is it possible for just a singular part to follow you like a nextbot?

if you do i’ll highly appreciate if you put the script in the comments

(i tried looking for a tutorial on yt)

Yes. It’s possible using AlignPosition. You should search for tutorials.

Hi! So, it’s definitely possible to make an object follow a player in Roblox Studio. To do this, you can use the “RunService.Heartbeat” event to continuously update the object’s position to the player’s position.

Here’s an example script:

local object = -- insert the object you want to follow the player here
local player = game.Players.LocalPlayer
local speed = 5 -- set the speed at which the object will follow the player

while true do
    local playerPos = player.Character.HumanoidRootPart.Position
    local objectPos = object.Position
    local direction = (playerPos - objectPos).Unit
    local distance = (playerPos - objectPos).Magnitude

    if distance > 0.1 then -- only moves if distance is greater than 0.1
        object.CFrame = object.CFrame + direction * speed * math.min(distance, 1/60)
    end

    wait()
end

2 Likes

You can use pathfinding service but instead of using move to you can tween the part to the position

Do not use Chat GPT to answer questions on the forum. Chat GPT is not very good at coding correctly in general, let alone in Rlua.

10 Likes