Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a part follow the back of character?

(This is what I have so far, and I know that it is inaccurate.) How do I make the part (asd) float about behind my character?

local run = game:GetService("RunService")
local cam = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character
local CameraPart = game.Workspace.asd



if not character or not character.Parent then
    character = player.CharacterAdded:wait()
end


while run.RenderStepped:wait() do

CameraPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.lookVector + Vector3.new(0,7,10)
cam.CameraSubject = CameraPart
--cam.CFrame = game.Workspace.asd.CFrame
cam.Focus = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
print(CameraPart.Position)

end

4 comments

0

Welds

0

Thanks but I don't know how to use it.

0

For starters, you want a BodyPosition parented to the part, probably

0

http://wiki.roblox.com/index.php?title=Weld --> There should be a script on it to weld parts togheter

1 answer

✓ Accepted answer

You can do something like this, although you shouldn't use a while loop for this, but rather welds or body movers.

local run = game:GetService("RunService")
local cam = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character
local CameraPart = game.Workspace.asd



if not character or not character.Parent then
    character = player.CharacterAdded:wait()
end


while run.RenderStepped:wait() do
	local hrp = player.Character.HumanoidRootPart
	CameraPart.CFrame = hrp.CFrame - hrp.CFrame.lookVector*2
	cam.CameraSubject = CameraPart
	cam.Focus = hrp.CFrame
end

3 comments

0

Uh god, your script is not FE

0

What does FE mean?

0

@RedcommanderV2 he wanted his script fixed, he never stated he needs it to be FE-compatible.

This discussion is preserved as it was. New answers, comments, and votes are closed.