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

CurrentCamera p can not be assigned to?

Asked by
Filipalla 504 Moderation Voter
7 years ago

The way this works is that i have vector3 values in serverstorage and i want to move the camera to the vector3 assigned in the value

game.Workspace.CurrentCamera.CFrame.p = Vector3.new(Cam1pl.Value.X, Cam1pl.Value.Y, Cam1pl.Value.Z)

but it returns this:

p can not be assigned to

1 answer

Log in to vote
3
Answered by 7 years ago
Edited 7 years ago

Well, you cannot assign p, it's a read-only value. Try this:

game.Workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(Cam1pl.Value.X, Cam1pl.Value.Y, Cam1pl.Value.Z))

Edit: Make sure you are running this script using a LocalScript

Ad

Answer this question