I need to trgger a remote event with desroy() but i have no idea how to do that?
Ive been looking around for a while this is my back up incase i dont find out how to work out this issue, What im trying to do is make a function when the gui gets destroyed, but i dont know how to do it, nor can i find any tutorial or page that can help with this specific situation, all efforts will be appreciated, thank you for taking your time to read this!
01 | local gui = script:WaitForChild( "ScreenGui" ) |
02 | local plr = game.Players.LocalPlayer |
03 | local SG = game.StarterGui |
05 | gui.Parent = plr.PlayerGui |
06 | script.Parent:RemoveDefaultLoadingScreen() |
13 | gui.Frame:TweenPosition(UDim 2. new( 0 , 0 , - 1.5 , 0 ), Enum.EasingDirection.InOut,Enum.EasingStyle.Quad, 1 ) |
19 | game.ReplicatedStorage.Cutscene:FireClient() |