什么是检查新的 Roblox 顶部栏的最佳方法?

许多游戏都有依赖顶部栏的GUI,其中一些受到了这个新顶部栏更新的影响。这对许多游戏(如 Bloxburg)和其他脚本(如使用顶部栏图标的 HD Admin)非常有用。截止目前为止,这些游戏和脚本的样子如下: HD Admin 哇,这个实际上看起来还不错!但是没有图标的连贯性。现在,看看 Bloxburg: Bloxburg 这个需要重大改进。看一下聊天和菜单图标,它们偏移了。Coeptus肯定可以使用一个函数来修复这个问题。那么,最好的方法是什么?

点赞
用户13072308
用户13072308

这是检查新的 Roblox 顶栏的最佳方法:

local Player = game:GetService("Players").LocalPlayer
local s, f = pcall(function()
    Player.PlayerGui:SetTopbarTransparency(1)
end)
if not f=="SetTopbarTransparency is not a valid member of PlayerGui" then
    -- 旧的顶栏存在
else
    -- 新的顶栏存在
end

这段代码可以工作,因为新的顶栏中已经废弃了 SetTopbarTransparency

2020-05-14 18:05:02