Im pretty much doing this
frame.ImageButton.Image = “rbxassetid://4579709245”
for some reason when I run the script the imagebutton’s image property is set to
4579709245
making the image not show up.
How do I fix this?
Im pretty much doing this
frame.ImageButton.Image = “rbxassetid://4579709245”
for some reason when I run the script the imagebutton’s image property is set to
4579709245
making the image not show up.
How do I fix this?
Lua is case sensitive. Frames added to GUIs are always with capital letters. That is your error.
Make it Frame.ImageButton.Image = “rbxassetid://4579709245”.
frame is the variable name, not the actual object
It sets the image values, but the problem is it only puts the decal id, and not rbsassetid…
heres the entire script…
assets = require(script.Assets) – this is a list of assets with their data –
player = game.Players.LocalPlayer.Name --variables–
guis = game.Players[player].PlayerGui
x = 1
while x <= #assets do --for every asset found–
wait(0.1)
assetid = assets[x].id
assetname = assets[x].title --get asset data--
assetthumb = assets[x].thumb
frame = script.item:Clone() --clone asset frame--
frame.Name = assetname
frame.TextLabel.Text = assetname
frame.ImageButton.Image = assetthumb
frame.Parent = guis.ScreenGui.Frame.ScrollingFrame
x = x + 1
end
The asset ID that you show in your thread is of a model. I assume you copied the wrong decal id.
https://www.roblox.com/library/4579709245/Brick
oof.
whoops!
dont know how I did that but okay.
thanks anyways!