LocalScript нужно вставлять в StarterGui: local tweenService = game:GetService("TweenService") local player = game.Players.LocalPlayer local camera = game.Workspace.Camera local camFolder = game.Workspace.cameras local cutscenePart = game.Workspace.cutscenePart local cam1 = camFolder:WaitForChild("cam1") local cam2 = camFolder:WaitForChild("cam2") local cameraCutscene1 = tweenService:Create(camera,TweenInfo.new(5),{CFrame = cam2.CFrame}) local cutscenePlayed = false cutscenePart.Touched:Connect(function(hit) if cutscenePlayed == false and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name == player.Name then cutscenePlayed = true camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = cam1.CFrame cameraCutscene1:Play() cameraCutscene1.Completed:Wait() task.wait(2)
LocalScript нужно вставлять в StarterGui:
local tweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local camera = game.Workspace.Camera
local camFolder = game.Workspace.cameras
local cutscenePart = game.Workspace.cutscenePart
local cam1 = camFolder:WaitForChild("cam1")
local cam2 = camFolder:WaitForChild("cam2")
local cameraCutscene1 = tweenService:Create(camera,TweenInfo.new(5),{CFrame = cam2.CFrame})
local cutscenePlayed = false
cutscenePart.Touched:Connect(function(hit)
if cutscenePlayed == false and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name == player.Name then
cutscenePlayed = true
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = cam1.CFrame
cameraCutscene1:Play()
cameraCutscene1.Completed:Wait()
task.wait(2)
camera.CameraType = Enum.CameraType.Custom
end
end)