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

Camera isn't going to intended target?

So basically I am trying to make a main menu but my player's camera won't switch over to a block I created as a camera, plz help

local Tween = game:GetService("TweenService")

local Frame = script.Parent:WaitForChild("Frame")

local Cam = workspace.CurrentCamera
local maincam = workspace:WaitForChild("1")

Cam.CameraType = Enum.CameraType.Scriptable
Cam.FieldOfView = 55

Cam.CFrame = maincam.CFrame

wait(2)
Frame.Visible = true

1 comment

0

maybe try lookvector

1 answer

✓ Accepted answer

I would make the camera's CFrame inside of a part looking at your desired location as I find this way more easier. When doing this make sure your part is front face is facing your desired location and that it is anchored where you want it and you can test and tweak its position to fit your liking. The following code is how to go about it, similar to yours.

spawn(function()
	local camera  = workspace.CurrentCamera
	local camPart = workspace.camPart
	local frame = script.Parent:WaitForChild("Frame")
	
	camera.CameraType = "Scriptable"

	camera.CFrame = camPart.CFrame

	wait(2)
	frame.Visible = true
end)

Hopefully this helps and if it did make sure to mark it as answered. :) if you have anymore questions just comment !

2 comments

0

thank you!

0

no problem :)

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