Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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)

1 comment

0

You can just save the cameratype, cframe, and subject before changing, and manually revert it after changing

1 answer

✓ Accepted answer

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!

1 comment

0

thx

This discussion is preserved as it was. New answers, comments, and votes are closed.