【问题标题】:ImageLabel doesn't display in BillboardGUIImageLabel 不显示在 BillboardGUI 中
【发布时间】:2023-02-06 10:18:59
【问题描述】:

所以,这是我的问题。 此脚本适用于一个图像 ID,但不适用于任何其他图像 ID。

我真的不知道为什么会这样。 这是脚本>>

function newEntity(imgId, eName)
    EntityBase = Instance.new("Part", workspace)
    EntityBase.Transparency = 1 
    EntityBase.Size = Vector3.new(0.9, 0.1, 0.7)
    EntityBase.Name = eName
    EntityBillboardGui = Instance.new("BillboardGui", EntityBase)
    EntityBillboardGui.StudsOffset = Vector3.new(0, 5, 0)
    EntityBillboardGui.Size = UDim2.new(0,250,0,250)
    EntityBillboardGui.MaxDistance = math.huge
    EntityBillboardGui.Adornee = EntityBase
    EntityImage = Instance.new("ImageLabel",EntityBillboardGui)
    EntityImage.Size = EntityBillboardGui.Size
    EntityImage.BackgroundTransparency = 1
    EntityImage.Image = imgId
    return EntityBase
end

troller = newEntity("rbxthumb://11954446780","imposter")
troller.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
trololol = Instance.new("Sound", troller)
trololol.SoundId = "http://www.roblox.com/asset/?id=5677788502"
trololol:Play()
wait(2)
troller:Destroy()
game.Players.LocalPlayer.Character.Humanoid.Health = 0

任何人都可以帮助修复它吗?

【问题讨论】:

  • oop 脚本被截断了,但第一行是:function newEntity(imgId,eName)
  • 也呃 idk 为什么它的 rbx 拇指,但它也不适用于 rbxassetid

标签: lua roblox luau


【解决方案1】:

对于初学者,我建议将父对象分开,如下所示: EntityBase = Instance.new("Part") EntityBase.Parent = workspace

第二:我建议不要使用单独的部分,只需将 billboardGui 放入玩家的头部即可

第三,你用错了 rbxthumb

rbxthumb://type=[ThumbnailType]&id=[TargetId]&w=[Width]&h=[Height]” These are the supported sizes and types

示例:rbxthumb://type=Avatar&id=123456789&w=720&h=720

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-30
    • 2022-08-18
    • 2010-11-15
    • 1970-01-01
    • 1970-01-01
    • 2021-07-11
    • 2020-04-19
    • 1970-01-01
    相关资源
    最近更新 更多