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

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

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

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

1 comment

0

If any mods see this, please close this post.

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