Update Event.luau

This commit is contained in:
Bl4ise 2024-05-02 20:51:34 +02:00 committed by GitHub
parent 7e06d676bf
commit 1a630a5baa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,14 +4,14 @@ local Type = require(script.Parent.Type)
local function createInstance(parent: Instance, name: string, class: string) local function createInstance(parent: Instance, name: string, class: string)
if not parent:FindFirstChild(name) then if not parent:FindFirstChild(name) then
local newInstance: Instance = Instance.new(class) local newInstance = Instance.new(class)
newInstance.Name = name newInstance.Name = name
newInstance.Parent = parent newInstance.Parent = parent
end end
end end
local function waitForChildren(parent: Instance, childrenNames: {string}) local function waitForChildren(parent: Instance, childrenNames: {string})
for _, name: string in ipairs(childrenNames) do for _, name in ipairs(childrenNames) do
task.spawn(function() task.spawn(function()
repeat repeat
task.wait() task.wait()