Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why is the texture format failing to resolve?

Asked by 8 years ago
Edited 8 years ago

I'm working on a multiplayer game involving points, and I'm trying to make a Scrolling GUI that displays the points at the end of the round. I'm using custom decals for the scrollbars, but they're failing to load. Instead, I receive an error that says,

Image failed to load StarterGui.ScreenGui.ScrollingFrame.BottomImage : http://www.roblox.com/asset/?id=[ID] because Failed to resolve texture format

I've looked this error up, and I haven't found any solutions. The only reason I ask is because I have no idea how to go about solving it.

Code:

for _,Player in next, game.Players:GetChildren() do
    local ScoreGui = Instance.new("ScreenGui")
    ScoreGui.Parent = Player.PlayerGui
    ScoreGui.Name = "ScoreGui"
    local ScoreGuiBase = Instance.new("ScrollingFrame")
    ScoreGuiBase.Parent = ScoreGui
    ScoreGuiBase.Name = "ScoreGui Base"
    [...]
    ScoreGuiBase.BottomImage = "http://www.roblox.com/asset/?id=457431167"
    ScoreGuiBase.MidImage = "http://www.roblox.com/asset/?id=457431033"
    ScoreGuiBase.TopImage = "http://www.roblox.com/asset/?id=457430208"
    ScoreGuiBase. Active = true
end

Assets:

https://web.roblox.com/Scroll-Bar-Top-item?id=457430208 https://web.roblox.com/Scroll-Bar-Middle-item?id=457431033 https://web.roblox.com/Scroll-Bar-Bottom-item?id=457431167

Thanks in advance, -Crystakyl.

1 answer

Log in to vote
0
Answered by 8 years ago

When converting an item to an asset for in-game purposes, you need to use what I call the the asset URL instead of the normal one. To get the asset URL, you need to take the ID and subtract one (or two/three if someone uploaded something at exactly the same time as you). So, try these IDs instead:

bottom = "http://www.roblox.com/asset/?id=457431165"
mid = "http://www.roblox.com/asset/?id=457431032"
top = "http://www.roblox.com/asset/?id=457430207"

Also, if that doesn't work, then I think that your top image is the problem:

https://www.roblox.com/unnamed-item?id=457430207

going to that URL (the asset URL), you can see that the asset has some weird hashtag thing going on. I suggest re-uploading that if your problem isn't solved.

0
Thanks! I hadn't realized I had to subtract 1 from the asset, even if it's a decal. The weird hashtag thing was because of the filter. Crystakyl 20 — 8y
0
No problem, I can't even tell you how long that took me to figure out. A lot of scripting and using ROBLOX is tough because there isn't explanations for all of these weird steps you have to take just to load a decal patrline5599 150 — 8y
Ad

Answer this question