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

My Camera Script Is Attaching Near The Humanoid When It Should Be Attaching To A Part?

Hello Im Have A Error With My Script For Some Reason I Made But There Are No Errors Nothing From The Output. See I Scripted A Camera Script Where It Gets A The Part's Cframe And Changes The Players Camera. But The Thing Its Doing When The Humanoid Spawns The Camera Does Not Go Where it is supposed to go. it is not attached on to the humanoid but near it. yes its that confusing. its in a LocalScript in StarterPack i have no idea what is wrong please leave your suggestions

local player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local cam = workspace.CurrentCamera

repeat wait()
	cam.CameraType = Enum.CameraType.Scriptable
until cam.CameraType == Enum.CameraType.Scriptable
cam.CFrame = workspace.Camera.CFrame
cam.CameraSubject = workspace.Camera


1 answer

✓ Accepted answer

You cameraPart name is the same as the usual camera, so its trying to attach camera to camera(i think), so just make this:

cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = workspace.CameraPart.CFrame -- just rename it

And, that basically it, hope it works

1 comment

0

Thank You So Much It Worked!

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