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

I dont know how to make a function call off of a destroyed value, how should i do it?

Asked by 2 years ago
Edited 2 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

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 thsi specific situation, all efforts will be appreciated, thank you for taking your time to read this!

local gui = script:WaitForChild("ScreenGui")
local plr = game.Players.LocalPlayer
local SG = game.StarterGui

gui.Parent = plr.PlayerGui
script.Parent:RemoveDefaultLoadingScreen()

repeat
    wait(.5)
until game:IsLoaded()
wait(5)

gui.Frame:TweenPosition(UDim2.new(0, 0, -1.5, 0), Enum.EasingDirection.InOut,Enum.EasingStyle.Quad, 1)

wait(1)
gui:Destroy()
 gui.script = nil 

game.ReplicatedStorage.Cutscene:FireClient()

end)
0
I don't understand. Are you trying to disable the script?? If so then just change line 17 to 'gui:findFirstChild("Script").Disabled = true' davie10863 9 — 2y

Answer this question