Improve settings script using New function
This commit is contained in:
parent
4680b21930
commit
1f450a0b1f
|
|
@ -1713,7 +1713,7 @@ binaryShrink = function(min, max, fits)
|
|||
end
|
||||
local getGuiOwner
|
||||
getGuiOwner = function(instance)
|
||||
while instance ~= nil do
|
||||
while (instance ~= nil) do
|
||||
if instance:IsA("ScreenGui") or instance:IsA("BillboardGui") then
|
||||
return instance
|
||||
end
|
||||
|
|
@ -2002,7 +2002,7 @@ CreateBasicTutorialPage = function(name, handleResize, skipTutorial, giveDoneBut
|
|||
end
|
||||
frame.Changed:connect(function(prop)
|
||||
if prop == "Parent" then
|
||||
if parentConnection ~= nil then
|
||||
if (parentConnection ~= nil) then
|
||||
parentConnection:disconnect()
|
||||
parentConnection = nil
|
||||
end
|
||||
|
|
@ -2675,7 +2675,7 @@ t.CreateSetPanel = function(userIdsForSets, objectSelected, dialogClosed, size,
|
|||
end
|
||||
local selectSet
|
||||
selectSet = function(button, setName, setId, _)
|
||||
if button and Data.Category[Data.CurrentCategory] ~= nil then
|
||||
if button and (Data.Category[Data.CurrentCategory] ~= nil) then
|
||||
if button ~= Data.Category[Data.CurrentCategory].Button then
|
||||
Data.Category[Data.CurrentCategory].Button = button
|
||||
if SetCache[setId] == nil then
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1836,7 +1836,7 @@ binaryShrink = (min, max, fits) ->
|
|||
|
||||
|
||||
getGuiOwner = (instance) ->
|
||||
while instance ~= nil
|
||||
while instance?
|
||||
if instance\IsA"ScreenGui" or instance\IsA "BillboardGui"
|
||||
return instance
|
||||
|
||||
|
|
@ -2152,7 +2152,7 @@ CreateBasicTutorialPage = (name, handleResize, skipTutorial, giveDoneButton) ->
|
|||
|
||||
frame.Changed\connect (prop) ->
|
||||
if prop == "Parent"
|
||||
if parentConnection ~= nil
|
||||
if parentConnection?
|
||||
parentConnection\disconnect!
|
||||
parentConnection = nil
|
||||
|
||||
|
|
@ -2837,7 +2837,7 @@ t.CreateSetPanel = (userIdsForSets, objectSelected, dialogClosed, size, position
|
|||
|
||||
|
||||
selectSet = (button, setName, setId, _) ->
|
||||
if button and Data.Category[Data.CurrentCategory] ~= nil
|
||||
if button and Data.Category[Data.CurrentCategory]?
|
||||
if button ~= Data.Category[Data.CurrentCategory].Button
|
||||
Data.Category[Data.CurrentCategory].Button = button
|
||||
|
||||
|
|
|
|||
1216
yue/46295863.yue
1216
yue/46295863.yue
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue