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

Why won't my cutscene script do anything? I click and it does nothing?

Asked by 3 years ago

Basically, I'm attempting to make a main menu with a cutscene, for my game, and I made this script:

local event = game.ReplicatedStorage.BoardClicked

script.Parent.MouseClick:Connect(function(click)
    event:FireClient(click)
end)

which activates the remote event, and then I have this local script in StarterGui:

local tweenservice = game:GetService("TweenService")
local camera = game.Workspace.Camera
local loading = script.Parent:WaitForChild("Loading")
local cutscenetime = 2

local tweeninginfo = TweenInfo.new(
    cutscenetime,
    Enum.EasingStyle.Sine,
    Enum.EasingDirection.Out,
    0,
    false,
    0
)

function tween(part1,part2)
    camera.CameraType = Enum.CameraType.Scriptable
    camera.CFrame = part1.CFrame

    local tween = tweenservice:Create(camera,tweeninginfo,{CFrame = part2.CFrame})
    tween:Play()
end
tween(game.Workspace.CutsceneParts.CutscenePart2,game.Workspace.CutsceneParts.CutscenePart3)

game.ReplicatedStorage.BoardClicked.OnClientEvent:Connect(function()
    tween(game.Workspace.MenuRoom.CutsceneParts.CutscenePart2,game.Workspace.MenuRoom.CutsceneParts.CutscenePart3)
    game.Workspace.MenuRoom.MenuBoard.MenuPart.Clicker:Destroy()
end)

What's wrong with it?

1 answer

Log in to vote
0
Answered by 3 years ago

Crap. I figured it out. I moved the cutsceneparts and forgot to edit one of the code lines.

0
If any mods see this, please close this post. MrOinkerzYT 87 — 3y
Ad

Answer this question