added delay for locking helpers
This commit is contained in:
parent
044b3a06e2
commit
dee13c5d26
@ -907,9 +907,7 @@ end
|
||||
function spawnOrRemoveHelper(state, name, position, rotation)
|
||||
if state then
|
||||
Player.getPlayers()[1].pingTable(position)
|
||||
local spawnedHelper = spawnHelperObject(name, position, rotation)
|
||||
spawnedHelper.setLock(true)
|
||||
return spawnedHelper.getGUID()
|
||||
return spawnHelperObject(name, position, rotation).getGUID()
|
||||
else
|
||||
return removeHelperObject(name)
|
||||
end
|
||||
@ -937,6 +935,9 @@ function spawnHelperObject(name, position, rotation)
|
||||
for _, obj in ipairs(sourceBag.getData().ContainedObjects) do
|
||||
if obj["Nickname"] == name then
|
||||
spawnTable.data = obj
|
||||
spawnTable.callback_function = function(spawnedObj)
|
||||
Wait.time(function() spawnedObj.setLock(true) end, 1)
|
||||
end
|
||||
return spawnObjectData(spawnTable)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user