I have a script that handles the remote events that are in Replicated Storage and the script is in ServerScriptService. I hit a button on a gui and it disables a local script that is in PlayerGui and is supposed to change the camera type to custom and the camera subject to the player's humanoid, however, it just keeps the options that are set in the local script. When a run a test server, the server sees the local script in the player gui, but the client doesn't.
Script in ServerScriptService:
local TeamChangeEvents = game:GetService('ReplicatedStorage'):WaitForChild('TeamChangeEvents') local TeamEastChangeClick = TeamChangeEvents:WaitForChild('TeamEastChangeClick') local TeamWestChangeClick = TeamChangeEvents:WaitForChild('TeamWestChangeClick') TeamEastChangeClick.OnServerEvent:connect(function(plr, button) plr.TeamColor = BrickColor.new("Really blue") button.Parent:TweenPosition(UDim2.new(-1.5,0,0,85), 'Out', 'Linear') button.Parent.Parent.WestTeam:TweenPosition(UDim2.new(1.5,0,0,-85), 'Out', 'Linear') if (plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15) then plr.Character.UpperTorso:Destroy() else plr.Character.Torso:Destroy() end print("KILLED east") wait(5.5) workspace.CurrentCamera.CameraSubject = plr.Character.Humanoid workspace.CurrentCamera.CameraType = Enum.CameraType.Custom plr.PlayerGui:WaitForChild('SmartLock').Disabled = true plr.Character.Humanoid.WalkSpeed = 16 plr.Character.Humanoid.JumpPower = 50 plr.Character:MoveTo(workspace.EastSpawn.Position) end) TeamWestChangeClick.OnServerEvent:connect(function(plr, button) plr.TeamColor = BrickColor.new("Really red") button.Parent:TweenPosition(UDim2.new(1.5,0,0,-85), 'Out', 'Linear') button.Parent.Parent.EastTeam:TweenPosition(UDim2.new(-1.5,0,0,85), 'Out', 'Linear') if (plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15) then plr.Character.UpperTorso:Destroy() else plr.Character.Torso:Destroy() end print("KILLED east") wait(5.5) plr.PlayerGui:WaitForChild('SmartLock').Disabled = true workspace.CurrentCamera.CameraSubject = plr.Character.Humanoid workspace.CurrentCamera.CameraType = Enum.CameraType.Custom plr.Character.Humanoid.WalkSpeed = 16 plr.Character.Humanoid.JumpPower = 50 plr.Character:MoveTo(workspace.WestSpawn.Position) end)
The Camera
, just like anything in PlayerGui(with FE on) is Local
, so the server cannot access/change them. Use a localscript to perform camera changes.