Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make the camera don't restart on respawn?

I made a script the main menu, however, when you reset, the camera also resets. I already disabled the Reset on Spawn option but it doesn't work.

In the main menu, the camera was a block that showed the map and when you press play the camera returns to your character. But when you reset, the camera goes back to the block and there's no way to go back to the character.

This is the main script:

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local camera = workspace.CurrentCamera

repeat wait()
	camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable

camera.CFrame = workspace.CameraPos.CFrame
local blur = Instance.new("BlurEffect",camera)
blur.Size = 10
script.Parent.ScreenGui.SoundEffects.Background:Play()

for i,v in pairs(script.Parent.ScreenGui:GetChildren()) do
	if v.ClassName == "TextButton" then
		v.MouseEnter:Connect(function()
			script.Parent.ScreenGui.SoundEffects.Sound:Play()
		end)
	end
end

This is the script that makes the camera go to your character when you press play:

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.SoundEffects.Sound2:Play()
	script.Parent.Parent.SoundEffects.Background:Stop()
	script.Parent.Parent.Enabled = false
	script.Parent.Parent.Parent.Conf.Enabled = true
	workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	workspace.CurrentCamera.Blur.Enabled = false
end)

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.