debugging 我怎样才能增加冷却时间到这个只对本地玩家的接近提示

ds97pgxw  于 2023-06-30  发布在  其他
关注(0)|答案(1)|浏览(120)

enter image description here
我想增加一个冷却时间的接近prommt只为当地的球员,这意味着将不会有冷却时间的其他球员,直到他们使用的接近太多,在advance感谢!
我试着用这个方法,它有点工作,但由于某种原因,它复制了所有现有的“比萨饼”在我的invenotry每当我试图抓住一个新的

neskvpey

neskvpey1#

您可以将以下内容放在localscript中并将其放在StarterPlayerScripts中,而不是使用服务器脚本。这样,服务器不必跟踪谁触发了接近度。

local db = false
local proxy = [YourProxyPath].Triggered:Connect(function(plr)
    if not db then 
        db = true
        print("triggered") 
        -- tell server to give items to the player using remoteEvent
    end
    wait(5)
    db = false
end)

相关问题