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

How Do you Make a Module Script Cutscene to play?

Asked by 6 years ago
Edited 6 years ago

Checked All The Things In the Roblox Wiki Experimented With the Module script And Never Worked. Please Help me Make a script to Run This Module 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 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()

1 answer

Log in to vote
1
Answered by 6 years ago

I am sorry, but this site isnt a request site. If you want to know how to script this you should go on "Roblox Wiki". Learn about ButtonGUI and how to connect things with it via a script. You could make a button clicked event in a script and just script what you want it to do. A cut scene? Script and play it with "play ()".

0
but this site is a request site. A site where people request for help, and you too should go on "Roblox Wiki" And learn how to detect when a player presses a key Fightysaur 0 — 6y
0
And the site is called "Scripting Helpers". So Who's gonna help if the site doesnt have people requesting for help. And i don't know if you know but i think i found a video to help you Fightysaur 0 — 6y
0
I see you joined this site just today, 15/4. You should go and read the rules first. This site isnt a request for scripts.. its a request for helping fix a script or explain something. HeyItzDanniee 252 — 6y
0
So What Did i see On your question On How to detect when a player presses a key That means you are requesting a script to detect Fightysaur 0 — 6y
View all comments (4 more)
0
And what did you get A Local script that didnt work You requested a local script Fightysaur 0 — 6y
0
And Why remove the question Fightysaur 0 — 6y
0
Because the question didnt helped? Also can you stop spamming me? I didnt request for a script, I wanted some help with detecting and I got it. Detecting a key isnt a big deal as "How Do you Make a Screen Gui Button to play a Module Script Cutscene?". Just stop please. Plus I already know how to detect, the answers didnt helped me. HeyItzDanniee 252 — 6y
0
I see you didnt get the question let me fix that Fightysaur 0 — 6y
Ad

Answer this question