I want to move the camera from one brick to the other, with a relatively fast camera move.
I click on the brick, and nothing happens.
I looked for a solution and I found one that didn't work.
I would like to make the camera face the front of the brick, and move somewhat fast towards the next camera brick.
function onClicked(plr)
local camera = game.Workspace.Camera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = game.Workspace.PaddockCam.CFrame
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
function onClicked(plr)
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = game.Workspace.PaddockCam
camera.CFrame = game.Workspace.PaddockCam.CFrame
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Run this on a localscript. The server can’t tell when a specific player clicks on something unless you fire a remote event. This should work fine on a localscript (i think).
The server can’t move your client’s camera. Each player has their own. A LocalScript also won’t run if it’s a child of a Part/non-character Model in the workspace.