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

Camera problems help?

Asked by
iLordy 27
9 years ago
local target = workspace.Part
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
local angle = 0

while wait() do
    camera.CoordinateFrame = CFrame.new(target.Position)  --Start at the position of the part
                           * CFrame.Angles(0, angle, 0) --Rotate by the angle
                           * CFrame.new(0, 0, 5)       --Move the camera backwards 5 units
    angle = angle + math.rad(1)
end

This code makes the player's camera circle a part when the player enters the game. It works fine but when i add

wait(10)
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"

to make the camera return back to the player after 10 seconds it just stops making the camera circle/Or it makes the camera circle and comes back to the player but when it comes back to player it makes the camera circle on him.Please help (By the way I put both those local scripts in StarterGui)

0
You're going to have to post your entire script, including all the `end`s, here. To make it display properly, highlight the code and click the Lua button, which will wrap it in a bunch of tilde characters. (~) adark 5487 — 9y

Answer this question