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

Weld a brick on players head and attach camera to it? [HELP]

Hello there Biocommand here, today I started working on a new project and what I am trying to do is when a player joins the script welds an insivible part on his or her head and attaches the camera to it, I already have the script for the camera I just need to script the weld how would I make that if you want to check the camera script just tell me by a comment and I will post it.

1 answer

✓ Accepted answer

So you're just having trouble welding it?

Pretty simple;

--Make the part
p = Instance.new("Part",game.Workspace.Player)
p.Name = "CameraFocus"
p.Size = Vector3.new(1,1,1)
p.Anchored = false
p.CanCollide = false
p.CFrame = CFrame.new()

--Make the Weld
w = Instance.new("Weld",p) --Parent it to the part
w.Part0 = w.Parent --Make Part0, it's parent, aka the part.
w.Part1 = w.Parent.Parent.Head --Make Part1, the head
w.C0 = CFrame.new(0,1.5,0) --Make it stand 1.5 studs above the head

--Adjust the Camera
game.Workspace.CurrentCamera.CameraType = "Scriptable"
game.Workspace.CurrentCamera.CameraSubject = p

This is the basic overview of how to do it. Create the part, create the weld, specify what to weld, and set the camera's subject to the part. Prett fun and simple

Any questions please comment below

Hope I Helped

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