I’m making a remote event that when you activate it and put a bool value that is true, the camera turns into a sort of 2D platformer game camera. The problem is that, after activating the remote event with the value true, then later activating it as false, it still does the 2D camera.
(local script) Code:
game.ReplicatedStorage.CamFollowPlayer.OnClientEvent:Connect(function(thing)
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
camera.CameraSubject = player.Character.HumanoidRootPart
camera.CameraType = Enum.CameraType.Attach
camera.FieldOfView = 40
game:GetService("RunService").RenderStepped:Connect(function()
if thing == true then
workspace.Cut.Position = player.Character.HumanoidRootPart.Position + Vector3.new(20, 0, 0)
camera.CFrame = workspace.Cut.CFrame
end
if thing == false then
print("yeah it's false")
end
end)
end)