Hello, Everybody, I am currently working on an FPS game, I am working on the menuGUI but I want my menu GUI to have a camera background with a very simple "play button" as demonstrated in this image Image 1 Once You press the button, your camera moves to "PartB" and is ended up in this position Image 2 My problem is that I can't quite make the "Play button" function properly" in my script I tried
Button.MouseButton1Click:Connect(function()
But it didn't work in my **local script **that is found in StarterGui>ScreenGui>Play>CameraHandler and is
wait(1) --how much time it takes when the game starts
local TweenService = game:GetService("TweenService")
local Camera = game.Workspace.CurrentCamera
local function MoveCamera(StartPart, EndPart, Duration, EasingStyle, EasingDirection)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = StartPart.CFrame
local Cutscene = TweenService:Create(Camera, TweenInfo.new(Duration, EasingStyle, EasingDirection), {CFrame = EndPart.CFrame})
Cutscene:Play()
wait(Duration)
end
local function Cutscene()
MoveCamera(game.Workspace.PartA, game.Workspace.PartB, 1.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
wait(5) --How much time the second camera waits until its closed
Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
end
Cutscene()
I slapped in a Wait () commands so it waits a few seconds before starting
Hope my question gets answered real soon ??

2 comments
where did you place the local script?
Like I said Above StarterGui>ScreenGui>Play>CameraHandler. The cameraHandler is the local script and the "Play" is the text button