Main Module BAE Camera Command

Hey everyone, I tried making a camera command using the bae basic module. The problem is when I fire true it sets the camera but when I re run the command and it fires falls it doesn’t reset my camera.

Main Module ( Server script)
> elseif Command == “camset” then

  for _, player in ipairs(game.Players:GetPlayers()) do
  	local character = player.Character
  	if character then
  		 if player:GetRankInGroup(33133026) ~= 9 then
  		if not cameraenabled then
  			game.ReplicatedStorage.Camera:FireClient(player, true)
  		else
  			game.ReplicatedStorage.Camera:FireClient(player, false)
  		end
  		 end				 
  	end
  end

Client side: (placed in starter GUI)

local Player = game.Players.LocalPlayer
local Camera = game.Workspace.CurrentCamera

game.ReplicatedStorage.Camera.OnClientEvent:Connect(function(set)
if set == true then
Camera.CameraType = “Scriptable”
Camera.CFrame = game.Workspace.camera.CFrame
else
if set == false then
Camera.CameraSubject = Player.Character.Humanoid
Camera.CameraType = “Custom”
Camera.CFrame = Player.Character.Head.CFrame
end
end
end)

Put it into codetags.

The code should be in codetags now. Thanks for the response.

Strange. It shows up for me tho

I solved it. Thanks for the response tho @Aspect!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.