Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a following brick?

Asked by
phriol 25
8 years ago

I want to make a brick that follows me where ever I go (without welds) . I've tried using the :MoveTo() function, but that didn't help.

0
Perhaps try PathFinding AI? Put the start in the brick, and the end in the player, but a little further so the part doesn't try to ram you. GreekGodOfMLG 244 — 8y
0
Provide your attempt please. Goulstem 8144 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

Try putting BodyPosition in the part, and change the BodyPosition's "position" property to your Torso's position. Maybe add some offset as well, so it's not running right into you. Try this:

-- Local script
local client = game:GetService("Players").LocalPlayer
local char = client.Character or client.CharacterAdded:wait()
repeat wait() until char:FindFirstChild("Torso")
local torso = char.Torso

local p = Instance.new("Part",workspace)
local f = Instance.new("BodyPosition",p)

while wait() do
    f.position = torso.Position+Vector3.new(1,5,1)
end

Ad

Answer this question