lua - 如何解决我在 roblox studio 中遇到的 timestop 问题?
问题描述
local model = game.ReplicatedStorage.BaconEvent
local InUse = game.ReplicatedStorage.BaconEvent.InUse
local sound = workspace.BaconTimeStop
local bacon = {}
local resume = workspace.StarPlatinumResume
local clock = workspace.Clock
local Stand = game.ServerScriptService.Summon.Stand
model.BaconTimeStop.OnServerEvent:Connect(function(player)
local find = workspace:GetDescendants()
if model.InUse.Value == false then
model.InUse.Value = true
sound:Play()
wait(2)
clock:Play()
game.Lighting.BaconTime.Enabled = true
for i=1, #find do
local That = find[i]
if That:IsA("Part") or That:IsA("MeshPart") then
if That.Anchored == false and That.Parent.Name ~= player.Name and That.Name ~= "Baseplate" and not That.Parent:IsA("Accessory") then
That.Anchored = true
table.insert(bacon, That)
elseif model.InUse.Value == true then
wait(5)
resume:Play()
wait(1)
model.InUse.Value = false
game.Lighting.BaconTime.Enabled = false
for i=1, #bacon do
bacon[i].Anchored = false
end
table.clear(bacon)
end
end
end
end
end)
出于某种原因,它只会在时间停止应该结束后停止时间'我自己想不通,我希望有人知道如何修复它注意:baconevent 是颜色校正部分
解决方案
推荐阅读
- javascript - Ask for help on how to get all the filtered list from specific array
- javascript - lazyloading of images gatsby
- python - Inorder traversal in binary search tree returns attribute error
- graphql - How to avoid returning null in Apollo Federation GraphQL
- vue.js - Cannot validate dynamic input fields in vue.js using vee-validate
- phpstorm - Debugging WordPress with Xdebug - PHP Fatal Error: Uncaught Error: Call to undefined function get_header()
- node.js - How do I find tagname of node with xpath?
- docker - Polling check Readiness of a Pod
- laravel - Laravel - 如何仅根据条件启用添加按钮
- javascript-objects - How to make "this" in nested function refer to parent object or what is the best practice to this problem?