首页 > 解决方案 > 如何解决我在 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 是颜色校正部分

标签: luaroblox

解决方案


推荐阅读