How CAN I fix this Camera error?

Hello guys, my name is Spideyalvaro99
So as you know, Im not a proffesional scripter but I always try to make my models and script. Today I needed a camera system and I found this one(FNAF2 Camera V.13 - Roblox) but it has a type of bug. As you can see in this video the camera point is looking to the camera model and is not inside the model.


I tryed to fix this problem but I didn’t find anything. Here I leave you some pictures from all the scripts. Some of them are the same for all(for example if there are 7 buttons, it is repeated 7 times).
I hope someone can help me and that this information can help someone in the future
Thanks.

2 Likes

I don’t see you actually scripting the player’s camera in any of these scripts. Could you please add the script that’s actually supposed to change the player’s camera position?


The purple links are an animation

Let me fix it give me a sec 30 charssssssssss

can you copy the script and send it here

It seems to me that the script only sets your camera’s CameraSubject to the part. If you would like to have the camera to look from the part, you’d have to set the CFrame to the part aswell. All you have to do is a simple Camera.CFrame = part.CFrame.

local Camera = workspace.CurrentCamera
Camera.CameraType = "Scriptable"
Camera.CameraSubject = workspace.CameraPart
Camera.CFrame = workspace.CameraPart.CFrame

To reset to player view, just change the CameraType back to custom and set the CameraSubject back to the character’s humanoid.

Camera.CameraSubject = LocalPlayer.Character:WaitForChild("Humanoid")
Camera.CameraType = "Custom"

do NOT set the cameras subject it just messes stuff up just change the cframe

CameraSubject does not mess stuff up. Infact; it’s kind of necessary. If you were to create a script to make your camera look at a moving part, a simple CameraSubject = part will suffice. If you “just change the CFrame”, you’d have to run that every single frame so your camera follows the part’s movement.

So where should I place the Camera.CFrame = part.CFrame in the script?
Is neccesary to change the CameraType to "Scriptable?

I couldn’t really understand the topic but it seems like something with lookVector.

Yeah its something with the CFrame or the Vector. The topic is about a camera system that doesnt work as it should be.

Just take RunService stepped event and lerp the CFrame to camera.Position with Part.Position being the lookVector. It shall work.

And how I do that? I mean, Where I Should place the RunService event?

Here you have it!

local cam = workspace.CurrentCamera

script.Parent.MouseEnter:connect(function()

cam.CameraType = Enum.CameraType.Attach

cam.CameraSubject=workspace.CamPart

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760028"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760054"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760079"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760096"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760135"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760167"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760212"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760241"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760295"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id=189760341"

wait(0.01)

script.Parent.Parent.ImageLabel.Image = "http://www.roblox.com/asset/?id="

script.Parent.Parent.ImageLabel.BackgroundTransparency = 1

local Focus = game.Workspace.CurrentCamera.Focus * CFrame.new(0, 0, 0.05)

game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(Focus.p)

end)

The solution to this error was to pick another camera model that was “Broken” and I fix it. If you want the model, contact me through message

2 Likes