Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Im Having Trouble Using Cutscene Editor?

Asked by
wamare 0
5 years ago
Edited 5 years ago

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()
0
there should be an option for that Father_Odin 2 — 5y
0
You can send the cutscene script here? i can edit and try it... yHasteeD 1819 — 5y
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 wamare 0 — 5y
0
Edit message and put block with code. yHasteeD 1819 — 5y

2 answers

Log in to vote
0
Answered by
HaveASip 494 Moderation Voter
5 years ago
Edited 5 years ago

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.

Ad
Log in to vote
0
Answered by
yHasteeD 1819 Moderation Voter
5 years ago
Edited 5 years ago

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)

Answer this question