-
What do you want to achieve?
I want the player’s camera reset back to its first person view after I purposely change them. -
What is the issue?
Whenever the player spawns (but not during the first spawn), the camera does not reset to its default settings (first person view) -
What solutions have you tried so far? I tried to modify the scripts a bit, but it doesn’t give the results I want.
Code from Player Manager (Module script, but to run inside server script)
local function resetPlayerGUI(Player)
Player.CameraMode = Enum.CameraMode.Classic
Player.CameraMinZoomDistance = 10
deletePlayerGUI(Player)
loadGUIsToPlayer(Player, true)
end
function PlayerManager:spawnPlayerCharacter(Player)
Player:LoadCharacter()
Player.Character.Parent = workspace.PlayersCharacter
Player.CameraMode = Enum.CameraMode.LockFirstPerson
Player.CameraMinZoomDistance = 0
PlayerCharacterSpawnFeedbackRemoteEvent:FireClient(Player)
end
Code from MainMenuGUIClass (Module script, but to be used in Local script)
local function goToPlayerStartScreenRoom(Player)
local StartScreenRoom = Rooms:WaitForChild("StartScreenRoom")
local CameraFocusPart = StartScreenRoom:WaitForChild("CameraFocusPart")
local CameraFocusPart_CFrame = CameraFocusPart.CFrame
camera.CameraType = "Scriptable"
camera.CFrame = CameraFocusPart_CFrame
end