I’ve made a script where a button goes from a camera back to the player. However when the player dies on this screen, the button that resets the camera back to normal will not work. I can’t seem to find a way to fix it. Even manually resetting the camera in workspace.
You can see in the camera tab the type is “follow” yet does not follow the player.
script of the button:
local currentcam = workspace.CurrentCamera
local start = game.ReplicatedStorage.GameStarted
local ended = game.ReplicatedStorage.GameEnded
local going = false
local playcam = workspace.CameraPart
local play = script.Parent.Play
local function onClick()
currentcam.CameraType = Enum.CameraType.Follow
script.Parent.Play.Visible = false
script.Parent.Parent.LoadoutGui.ToggleLoadoutGui.Visible = false
script.Parent.Parent.LoadoutGui.Loadout.Visible = false
script.Parent.TextLabel.Visible = false
script.Parent.Red.Visible = true
script.Parent.Blue.Visible = true
end
play.MouseButton1Click:Connect(onClick)