i made this dumb little script that makes a bunch of parts with random images, but most of the images are blank even if they have an ID
Heres the script:
local Service = game:GetService("InsertService")
local function MakeDumbPart(ID)
local Part = script.Part:Clone()
Part.Parent = game.Workspace
local BaseID = "http://www.roblox.com/asset/?id="
Part.Decal.Texture = BaseID .. tostring (ID-1)
Part.Spawn:Play()
end
local RandoSearched = {
"fart",
"dog",
"cat",
"furry",
"flubber",
"sigma",
"face"
}
task.wait(4)
Search = RandoSearched[math.random(1, #RandoSearched)]
print(Search)
Items = Service:GetFreeDecals(Search, 1)
for _, V in Items[1].Results do
print(V.AssetId.." Made by: "..V.CreatorName)
MakeDumbPart(V.AssetId)
task.wait(0.05)
end
When it applys the IDs most of the time they dont load
These are asset ids, you need to get the content id of them
well how do i get an image id from it
Like this
local BasedId = "http://www.roblox.com/asset/?id="
put thos on based ID
OH WAIT MB IM GOIN TO WRITE ANOTHER COMMENT LOL.
Yes sorry, i wake up now, try this script
local Service = game:GetService("InsertService")
local function MakeDumbPart(ID)
local Part = script.Part:Clone()
Part.Parent = game.Workspace
local BaseID = "rbxassetid://"
Part.Decal.Texture = BaseID .. tostring(ID)
Part.Spawn:Play()
end
local RandoSearched = {
"fart",
"dog",
"cat",
"furry",
"flubber",
"sigma",
"face"
}
task.wait(4)
local Search = RandoSearched[math.random(1, #RandoSearched)]
local Items = Service:GetFreeDecals(Search, 1)
if Items and Items[1] and Items[1].Results then
for _, V in ipairs(Items[1].Results) do
print(V.AssetId .. " Made by: " .. V.CreatorName)
if V.AssetId then
MakeDumbPart(V.AssetId)
end
task.wait(0.05)
end
end
This is a really REALLY outdated version of my script, heres the new one:
local function MakeDumbPart(Thinggy)
local TS = game:GetService("TweenService")
local ID = Thinggy.AssetId
script.Parent.Area.Image.Image = 0
print(Thinggy)
print(ID)
TS:Create(script.Parent.Area, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Position = UDim2.new(0, 0,1, 0)}):Play()
task.wait(2)
if script.Parent.Area.Image.IsLoaded ~= true then
while script.Parent.Area.Image.IsLoaded ~= true do
local Service = game:GetService("InsertService")
local RandoSearched = {
"fart",
"dog",
"cat",
"furry",
"flubber",
"sigma",
"face"
}
--task.wait(4)
local Search = RandoSearched[math.random(1, #RandoSearched)]
print(Search)
local Items = Service:GetFreeDecals(Search, 0)
print(Items)
ID = Items[1].Results[math.random(1, #Items)].AssetId
script.Parent.Area.Image.Image = "http://www.roblox.com/asset/?id="..tostring(ID)
task.wait()
print("FailedToLoad")
end
end
script.Parent.Area.Image.Image = "http://www.roblox.com/asset/?id="..tostring(ID)
--script.Parent.Area.Image.Image = "http://www.roblox.com/asset/?id="..tonumber(ID-1)
task.wait(3)
TS:Create(script.Parent.Area, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Position = UDim2.new(0, 0,0.697, 0)}):Play()
end
local function DoThething()
local Service = game:GetService("InsertService")
local RandoSearched = {
"fart",
"dog",
"cat",
"furry",
"flubber",
"sigma",
"face"
}
--task.wait(4)
local Search = RandoSearched[math.random(1, #RandoSearched)]
print(Search)
local Items = Service:GetFreeDecals(Search, 0)
print(Items)
MakeDumbPart(Items[1].Results[math.random(1, #Items)])
end
task.wait(3)
DoThething()
while task.wait(10) do
DoThething()
end
1 Like
Ok try this one i guess
local function MakeDumbPart(Thinggy)
local TS = game:GetService("TweenService")
local ID = Thinggy.AssetId
local AreaImage = script.Parent.Area.Image
AreaImage.Image = "rbxassetid://0"
TS:Create(script.Parent.Area, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Position = UDim2.new(0, 0, 1, 0)}):Play()
task.wait(2)
-- Atualiza a imagem
AreaImage.Image = "rbxassetid://"..tostring(ID)
-- Espera a imagem carregar
while not AreaImage.IsLoaded do
local Service = game:GetService("InsertService")
local RandoSearched = {
"fart",
"dog",
"cat",
"furry",
"flubber",
"sigma",
"face"
}
local Search = RandoSearched[math.random(1, #RandoSearched)]
print(Search)
local Items = Service:GetFreeDecals(Search, 0)
print(Items)
ID = Items[1].Results[math.random(1, #Items)].AssetId
AreaImage.Image = "rbxassetid://"..tostring(ID)
task.wait()
end
TS:Create(script.Parent.Area, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Position = UDim2.new(0, 0, 0.697, 0)}):Play()
end
local function DoThething()
local Service = game:GetService("InsertService")
local RandoSearched = {
"fart",
"dog",
"cat",
"furry",
"flubber",
"sigma",
"face"
}
local Search = RandoSearched[math.random(1, #RandoSearched)]
local Items = Service:GetFreeDecals(Search, 0)
MakeDumbPart(Items[1].Results[math.random(1, #Items)])
end
task.wait(3)
DoThething()
while task.wait(10) do
DoThething()
end
that didnt work for me idk
char limit