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

Camera script problem?

Asked by 8 years ago

I've been making my game recently, And i added a Camera script. But i had a problem, I inserted the CamPart into a model (grouped it with other CamParts) and when i drag my mouse to the button, it turns into a black screen. It's grouped really.

local cam = workspace.CurrentCamera

script.Parent.MouseButton1Down:connect(function()
cam.CameraType = Enum.CameraType.Attach
cam.CameraSubject=workspace.CamPart

local Focus = game.Workspace.CurrentCamera.Focus * CFrame.new(0, 0, 0.05)
game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(Focus.p)
end)
0
please edit the post and put your code in between the "~~~~~~ ~~~~~~" Kryddan 261 — 8y

Answer this question