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:
1 | local event = game.ReplicatedStorage.BoardClicked |
3 | script.Parent.MouseClick:Connect( function (click) |
4 | event:FireClient(click) |
which activates the remote event, and then I have this local script in StarterGui:
01 | local tweenservice = game:GetService( "TweenService" ) |
02 | local camera = game.Workspace.Camera |
03 | local loading = script.Parent:WaitForChild( "Loading" ) |
06 | local tweeninginfo = TweenInfo.new( |
08 | Enum.EasingStyle.Sine, |
09 | Enum.EasingDirection.Out, |
15 | function tween(part 1 ,part 2 ) |
16 | camera.CameraType = Enum.CameraType.Scriptable |
17 | camera.CFrame = part 1. CFrame |
19 | local tween = tweenservice:Create(camera,tweeninginfo, { CFrame = part 2. CFrame } ) |
22 | tween(game.Workspace.CutsceneParts.CutscenePart 2 ,game.Workspace.CutsceneParts.CutscenePart 3 ) |
24 | game.ReplicatedStorage.BoardClicked.OnClientEvent:Connect( function () |
25 | tween(game.Workspace.MenuRoom.CutsceneParts.CutscenePart 2 ,game.Workspace.MenuRoom.CutsceneParts.CutscenePart 3 ) |
26 | game.Workspace.MenuRoom.MenuBoard.MenuPart.Clicker:Destroy() |
What's wrong with it?