Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

CFrame wants to be Vector3 when with Vector3 wants CFrame?

Asked by 4 years ago
Edited 4 years ago

https://imgur.com/a/UIS6dhA

I've tested the script in a LocalScript and a Script. I can't tell if i'm missing something or what but this is really bugging me. Vector3 isn't apart of CurrentCamera and so i'm stumped...

2 answers

Log in to vote
0
Answered by 4 years ago

Hey!

Simple solution. Instead of saying Position, you used CFrame. It's a common mistake I make.

workspace.CurrentCamera.CFrame = CFrame.new(workspace.Map.CutsceneAreas.AppartementAlpha.CharPosition.Position) -- See, position instead of CFrame after CharPosition.

This is what you need to change. Tell me if there's still an error!

0
He doesn't need a new CFrame. I just reused his CFrame from before. User#30567 0 — 4y
0
Also You spelled Apartment wrong XD User#30567 0 — 4y
0
well oops lolol1901 28 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

The syntax for CFrame.new is actually

CFrame.new(Vector3.new(x, y, z))

But an easier way is not to make a new CFrame, but use your existing one so that:

workspace.CurrentCamera.CFrame = workspace.Map.CutsceneAreas.ApartmentAlpha.CharPosition.CFrame

Answer this question