How would I make a cutscene when a part is clicked?

As the title says. I have no experience with cutscenes so any help is appreciated! I know how to activate the cutscene, but I don’t know how to make the cutscene itself is what I am trying to say.

1 Like

You can run a touched event, and when the part is touched it sends a RemoteEvent to the client/clients (Ex. Remote:FireClient(Player) or Remote:FireAllClients())

Then, after sending the event you create a LocalScript in StarterGui and add

Remote.OnClientEvent:Connect(function()
    -- Play Cutscene
end)

Here is the question you been asking. You can create a Tween by tweening 2 parts cframe, from point1 to point2

local TweenService = game:GetService("TweenService")

TweenService:Create(point1, TweenInfo.new(CutsceneDelay), {CFrame = point2})
2 Likes

This would go in the local script in starter gui?

Why does it have to be in starter GUI?

I’m not sure if this will work for you, but it worked fine for me.
As @NotCasry said, you tween a part/camerapoint from point 1 to point 2, and bind the player’s camera to that part/camerapoint. All of the script I put inside local script and place it in StarterPlayerScript.
If you want to trigger the cutscene, just add a script in the “click part” to fire remote event.

Where do I put the remote event? @NotCasry @GoldCreeperKing

UPDATE

I found a tutorial and followed it, I added the part where if you click the button then the cutscene plays. The problem is that whenever I click the part, my screen is stuck in one position but my player can still move.

Script1 (ServerScriptService)


local CutsceneCamEvent = game.ReplicatedStorage.CutsceneCamEvent
local ReturnCamEvent =game.ReplicatedStorage.ReturnCamEvent

CutsceneCamEvent.OnServerEvent:Connect(function()
	wait(2)

	CutsceneCamEvent:FireAllClients(CutsceneCams.Cam1.CFrame)

	wait(3)

	CutsceneCamEvent:FireAllClients(CutsceneCams.Cam2.CFrame)

	wait(3)

	ReturnCamEvent:FireAllClients()
end) 

-- I think it shouldn't be OnServerEvent but when I do OnClientEvent it won't work.

--Script 2 (StarterGUI (local script))

local Camera = game.Workspace.Camera
local CutsceneCamEvent = game.ReplicatedStorage.CutsceneCamEvent
local ReturnCamEvent = game.ReplicatedStorage.ReturnCamEvent

local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, false, 0)



CutsceneCamEvent.OnClientEvent:Connect(function(CamCFrame)
	Camera.CameraType = Enum.CameraType.Scriptable

	TweenService:Create(Camera, Info, {CFrame = CamCFrame}):Play()
end)

ReturnCamEvent.OnClientEvent:Connect(function()
	Camera.CameraType = Enum.CameraType.Follow
end)

--Script3 (The button you click to activate the cutscene)

local CD = game.Workspace.Part.ClickDetector
local RE = game.ReplicatedStorage.CutsceneCamEvent

CD.MouseClick:Connect(function()
	RE:FireAllClients()
end)

Bumping because I STILL NEED HELP!!

Bumping AGAIN! Can someone help me please?

try to use bindtorenderstep to make the camera follow tween part

Here is my example:

local tweenservice = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local Event = Path to the remoteevent
local Info = TweenInfo.new(Ur tween inf)
local Property = {CFrame = CFrame.new(x,y,z)}
local camera = Path to the camerapoint (not players camera)
local Currentcamera = workspace.CurrentCamera

function RenderS()
Currentcamera.CFrame = camera.CFrame
end

function Animation()
Currentcamera.CameraType = "Scriptable"
Currentcamera.CFrame = camera.CFrame
wait(0.1)
tweenservice:Create(camera, Info, Property):Play()
RunService:BindToRenderStep("Test", 150 , RenderS)

task.wait(4.5) -- wait time for your tween to finish

RunService:UnbindFromRenderStep("Test")
Currentcamera.CameraType = "Custom"
Currentcamera.CameraSubject = player.Character.Humanoid
end

Event.OnClientEvent:Connect(Animation)

does the script go in StarterGUI?
@GoldCreeperKing

I put it in StarterPlayerScripts, but yeah u can put it there if u want

I don’t know why it is in StarterGui instead of StarterPlayerScripts or something