local DemoNotice = script.Parent.DemoNoitice
local button = DemoNotice.Play
local SFX = script.Parent.Sounds
local ButtonHoverSound = SFX.ButtonHover
local ButtonPressed = SFX.ButtonPressed
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local MenuMusic = SFX.Music
MenuMusic:Play()
local StopCam = false
local function MouseHover()
ButtonHoverSound:Play()
end
local function Play()
ButtonPressed:Play()
DemoNotice.Visible = false
MenuMusic:Stop()
Camera.CameraType = Enum.CameraType.Custom
StopCam = true
end
button.MouseEnter:Connect(MouseHover)
button.MouseButton1Click:Connect(Play)
local Cameras = workspace:WaitForChild("Cameras")
local CameraPart1 = Cameras:WaitForChild("Camera1")
local CameraPart2 = Cameras:WaitForChild("Camera2")
local CameraPart3 = Cameras:WaitForChild("Camera3")
local CameraPart4 = Cameras:WaitForChild("Camera4")
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.Cameras.Camera1.CFrame
while true do
if StopCam == false then
for num = 0,1,.001 do
Camera.CFrame = CameraPart1.CFrame:lerp(CameraPart2.CFrame,num)
game:GetService("RunService").RenderStepped:Wait()
end
for num = 0,1,.001 do
Camera.CFrame = CameraPart2.CFrame:lerp(CameraPart3.CFrame,num)
game:GetService("RunService").RenderStepped:Wait()
end
for num = 0,1,.001 do
Camera.CFrame = CameraPart3.CFrame:lerp(CameraPart4.CFrame,num)
game:GetService("RunService").RenderStepped:Wait()
end
for num = 0,1,.001 do
Camera.CFrame = CameraPart4.CFrame:lerp(CameraPart1.CFrame,num)
game:GetService("RunService").RenderStepped:Wait()
end
end
end
So i have this play button and everything works expect stoping the cameras and giving the player a normal view it just keeps cframing the the other camera how do i stop this?
