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

Camera not changing CFrame?

Trying to put the camera's position based on a part's CFrame but it is not working properly. I am not too sure why though, it does not error and it seems to me that it "worked" without actually changing anything, even though it should of. The camera does not change at all, it stays on the player. It is a local script in StarterPlayerScripts, the local script is running at the start of the game but does not change my camera. I've tried adding delays, putting it in startercharacterscripts, nothing changes the camera. Is there something I am missing?

local cam = workspace.CurrentCamera
local part = workspace:WaitForChild("Part")

cam.CFrame = part.CFrame
cam.CameraType = Enum.CameraType.Track

2 comments

0

try putting line 5 before line 4 and setting the camera subject

0

I think this post will be really helpful to people because a few types of games do require this!

1 answer

local cam = workspace.CurrentCamera
local part = workspace:WaitForChild("Part")

cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = part.CFrame

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