Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i Add pictures on this Crate System??

I'm trying to make a Crate system.... I wanted to put pictures on it when the name pops up. How do i add a script to load the picture of the item when the name of it pops up???

local list = {
	"Rocket (Rare)", -- Rare 1
	"Orange (Common)",
	"Orange (Common)",
	"Orange (Common)",-- Common 1
	"Apple (Common)",
	"Apple (Common)",
	"Apple (Common)", -- Common 2
	"Waterbottle (Common)",
	"Waterbottle (Common)",
	"Waterbottle (Common)", -- Common 3
	"Soccerball (Uncommon)",
	"Soccerball (Uncommon)", -- Uncommon 1
	"Football (Uncommon)",
	"Football (Uncommon)" -- Uncommon 2
	
	 
}

local Enabled = true

script.Parent.MouseButton1Click:Connect(function()

	if Enabled == false then return end
	Enabled = false
	
	local time = 0.025
	
	for i = 1, 75 do
		script.Parent.Parent.result.Text = list[math.random(1,	 #list)]
		
		if i  == 50 then time = 0.05 end
		if i  == 55 then time = 0.1 end
		if i  == 60 then time = 0.2 end
		if i  == 65 then time = 0.4 end
		if i  == 70 then time = 0.8 end
		if i  == 75 then 
			   script.Parent.Parent.text.Text = "You have aquired..."
			   script.Parent.Parent.done.start.Disabled = false
		end
		wait(time)	
	end
end)

U can add or re Script the script... :) thanks

2 comments

0

U simply can't.

0

o u dont expect ppl to re and add the script when u paste it on a website which other ppl can view?

1 answer

You would have to make the pictures itself and hide those pictures in the game storage. then simply assign every picture to the values. then insert the pic you want to a frame that is located near the text. for example:

local picList ={
RocketPic = --insert pic ids for all
OrangePic = 
ApplePic = 
WaterbottlePic = 
SoccerballPic = 
FootballPic = 
}
local list = {
    "Rocket (Rare)", -- Rare 1
    "Orange (Common)",
    "Orange (Common)",
    "Orange (Common)",-- Common 1
    "Apple (Common)",
    "Apple (Common)",
    "Apple (Common)", -- Common 2
    "Waterbottle (Common)",
    "Waterbottle (Common)",
    "Waterbottle (Common)", -- Common 3
    "Soccerball (Uncommon)",
    "Soccerball (Uncommon)", -- Uncommon 1
    "Football (Uncommon)",
    "Football (Uncommon)" -- Uncommon 2


}

local Enabled = true

script.Parent.MouseButton1Click:Connect(function()

    if Enabled == false then return end
    Enabled = false

    local time = 0.025

    for i = 1, 75 do
        script.Parent.Parent.result.Text = list[math.random(1,   #list)]
	script.Parent.Parent.resultPic.Image = --base it off whatever the "list" value is
        if i  == 50 then time = 0.05 end
        if i  == 55 then time = 0.1 end
        if i  == 60 then time = 0.2 end
        if i  == 65 then time = 0.4 end
        if i  == 70 then time = 0.8 end
        if i  == 75 then 
               script.Parent.Parent.text.Text = "You have aquired..."
               script.Parent.Parent.done.start.Disabled = false
        end
        wait(time)  
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.