script.Parent.MouseClick:Connect(function()
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local Cameras = workspace:WaitForChild('Camera')
local CameraPart1 = Cameras:WaitForChild('CameraPart1')
local CameraPart2 = Cameras:WaitForChild('CameraPart2')
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = CameraPart1.CFrame
for Num = 0,1,.01 do
Camera.CFrame = CameraPart1.CFrame:lerp(CameraPart2.CFrame,Num)
wait()
end
end)
I have this in a local script that is inside of a Clickdetector. When I click the button in the game it does not do anything or even output anything. This script should set up the camera and then move it where I want it. I am new to Roblox Lua and got this by watching a youtube video. I would appreciate some help.
