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

"Scriptable" camera mode issues.

Hi guys!

Right, so I usually use the default "watch" camera mode with camera manipulation, but I think it's time to make my camera more professional and turn it scriptable since players can move the camera about if it's not scriptable, and I don't want that.

This is the current script I use when it is NOT scriptable:

	while rot.Value do
		wait()
		cam.CameraSubject = targ
		cam.CoordinateFrame = CFrame.new(targ.Position) * CFrame.Angles(0, angle, 0) * CFrame.new(0, 10, -30)
		angle = angle + math.rad(1)
	end

This works absolutely fine when it isn't scriptable, but when I turn it scriptable all hell breaks loose. I don't really understand what's happening, and I can't find any in depth guide anywhere. Please can someone either give me a tutorial or make the script work the same way except for scriptable camera types? Thanks a lot!

Tom

1 answer

I'm not positive this works but, I think your problem is that when the CameraType is being set to Scriptable the direction of the camera is being set to the wiki had this on the CoordinateFrame page " If the camera type is Scriptable, it also sets the direction the camera faces." By that logic you might want to try to set the Focus to the targets head position.

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