mirror of
https://github.com/imezx/Warp.git
synced 2025-04-24 15:10:03 +00:00
Update Event.luau
This commit is contained in:
parent
7e06d676bf
commit
1a630a5baa
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue