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

How to make camera go back to normal after manipulating it?

Asked by 3 years ago

I don't know how to make the camera go back to normal after I manipulate it, what properties do i change???

game.ReplicatedStorage.CAMSET_RE.OnClientEvent:Connect(function(bool1)
    if bool1 == true then
        print("ea")
        --game.Players.LocalPlayer.Backpack.Cameras.Disabled = false
        cam.CameraType = Enum.CameraType.Scriptable
        cam.CFrame = game.Workspace.WeaponSelection.CamOrigin.CFrame
        --cam.CameraSubject = game.Workspace.WeaponSelection.CamOrigin2
        --ts:Create(cam, TweenInfo.new(1.5, Enum.EasingStyle.Quint), {["CFrame"] = game.Workspace.WeaponSelection.CamOrigin2.CFrame}):Play()
    else
        --what do i do here lol
    end
end)
0
You can just save the cameratype, cframe, and subject before changing, and manually revert it after changing User#30567 0 — 3y

1 answer

Log in to vote
2
Answered by 3 years ago

local plr = game.Players.LocalPlayer game.ReplicatedStorage.CAMSET_RE.OnClientEvent:Connect(function(bool1) if bool1 == true then print("ea") --game.Players.LocalPlayer.Backpack.Cameras.Disabled = false cam.CameraType = Enum.CameraType.Scriptable cam.CFrame = game.Workspace.WeaponSelection.CamOrigin.CFrame --cam.CameraSubject = game.Workspace.WeaponSelection.CamOrigin2 --ts:Create(cam, TweenInfo.new(1.5, Enum.EasingStyle.Quint), {["CFrame"] = game.Workspace.WeaponSelection.CamOrigin2.CFrame}):Play() else cam.CameraType = Enum.CameraType.Custom cam.CameraSubject = plr.Character.Humanoid end end)

You just have to set the camera to custom and set the CameraSubject to the players humanoid. Hope this works!

0
thx R_LabradorRetriever 198 — 3y
Ad

Answer this question