Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Im Having Trouble Using Cutscene Editor?

I am trying to use the cutscene editor by CloneTrooper. I know how to make the cutscenes but, I want to know how to make the cutscene affect all players when I step on the block. I'm guessing I have to change the script or something I'm a bit new.

repeat wait () until game.Workspace.CurrentCamera ~= nil

local c = game.Workspace.CurrentCamera
local data = LoadLibrary("RbxUtility").DecodeJSON(script.CutsceneData.Value)
local rs = game:GetService("RunService").RenderStepped

function tweenCam(c1,f1,time,fov,roll)
	local c0,f0,fv0,r0,frames = c.CoordinateFrame,c.Focus,c.FieldOfView,c:GetRoll(),time/0.015
	for i = 1,frames do
		c.CameraType = "Scriptable"
		c.CoordinateFrame = CFrame.new(c0.p:lerp(c1.p,i/frames),f0.p:lerp(f1.p,i/frames))
		c.FieldOfView = (fv0+(fov-fv0)*(i*(1/frames)))
		c:SetRoll(r0+(roll-r0)*(i*(1/frames)))
		rs:wait()
	end
end

print("Running")
c.CameraSubject = nil	
c.CameraType = "Scriptable"
c.CoordinateFrame = CFrame.new(unpack(data[1].c1))
c.Focus = CFrame.new(unpack(data[1].f1))
c.FieldOfView = data[1].FOV
c:SetRoll(data[1].Roll)
if script:findFirstChild("SkipCutsceneGuiValue") then
	local gui = script.SkipCutsceneGui:clone()
	gui.Parent = game.Players.LocalPlayer.PlayerGui
	gui.Cutscene.Value = script
	gui.Main.Debug.Disabled = false
	script.SkipCutsceneGuiValue.Value = gui
end
for i = 2,#data do
	tweenCam(CFrame.new(unpack(data[i].c1)),CFrame.new(unpack(data[i].f1)),data[i].step,data[i].FOV,data[i].Roll)
end
c.CameraSubject = game.Players.LocalPlayer.Character.Humanoid	
c.CameraType = "Custom"
c.FieldOfView = 70
if script:findFirstChild("SkipCutsceneGuiValue") then
	if script.SkipCutsceneGuiValue.Value ~= nil then
		script.SkipCutsceneGuiValue.Value:Destroy()
	end
end
script:Destroy()

4 comments

0

there should be an option for that

0

You can send the cutscene script here? i can edit and try it...

0

Here goes the script repeat wait () until game.Workspace.CurrentCamera ~= nil local c = game.Workspace.CurrentCamera local data = LoadLibrary("RbxUtility").DecodeJSON(script.CutsceneData.Value) local rs = game:GetService("RunService").RenderStepped function tweenCam(c1,f1,time,fov,roll) local c0,f0,fv0,r0,frames = c.CoordinateFrame,c.Focus,c.FieldOfView,c:GetRoll(),time/0.015 for i = 1,frames

0

Edit message and put block with code.

2 answers

For first put that localscript in RepStorage. Then insert a normal (not local) script into that block and type in this:

local RS = game:GetService("ReplicatedStorage")
local CutScene = RS:WaitForChild("CutScene") --Your cutscene name here
local block = script.Parent
local ready = true

block.Touched:Connect(function(hit)
	if ready then -- I put this debounce to prevent spam
		local object = hit.Parent
		local Human = hit.Parent:FindFirstChild("Humanoid")
		if Human ~= nil then
			if object.Name == "wamare" then
				ready = false
				for _,player in pairs(game.Players:GetPlayers()) do --Cloning that cutscene into players player gui and activating.
					local ClonedCutScene = CurScene:Clone()
					ClonedCutScene.Parent = player.PlayerGui
					ClonedCutScene.Disabled = false
				end
				wait(5)
				ready = true
			end
		end
	end
end)

I am not sure if that will work,so sorry if not.

Put the "CutsceneScript" in replicated storage Create script on Block that you like to show cutscene for all players And put this code:

-- Put this script into a block --

-- Remember to put CutsceneScript on ReplicatedStorage! --

local debounce = false
local debouncetime = 3
local cutscenescript = game:GetService("ReplicatedStorage"):FindFirstChild("CutsceneScript")

script.Parent.Touched:Connect(function(hit)
    if debounce == false and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("CutsceneScript") == nil then
        local char = hit.Parent
        debounce = true
        for i,v in pairs(game.Players:GetPlayers()) do
            	local c = cutscenescript:Clone()
            	c.Parent = v.Character
            	c.Disabled = false
        end
        char:MoveTo(Vector3.new(script.Parent.Position.X,script.Parent.Position.Y,script.Parent.Position.Z-7))
        wait(debouncetime)
        debounce = false
    elseif debounce == false and hit.Parent.Parent:FindFirstChild("Humanoid") then
        local char = hit.Parent.Parent
        debounce = true
        for i,v in pairs(game.Players:GetPlayers()) do
            local c = cutscenescript:Clone()
            c.Parent = v.Character
            c.Disabled = false
        end
        char:MoveTo(Vector3.new(script.Parent.Position.X,script.Parent.Position.Y,script.Parent.Position.Z-7))
        wait(debouncetime)
        debounce = false
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.