The goal of the script is to choose a random item from within the frame "Items". After selecting it will rename the object to "BuyItemSelected". After renaming it should change the transparency. The goal is to make it appear to flash and fade in and out. If there is a better way to do this or an easy solution please provide the complete edited or new script. Thanks so much! (Credit will be given in the "Credits" Gui on this game: http://www.roblox.com/--place?id=182401128)

while true do
	wait(1) --(10) will be used after testing
local modelGroup = game.Players.LocalPlayer.PlayerGui.StoreGui.Welcome:FindFirstChild("Items"):GetChildren()
local PickedModel = modelGroup[math.random(1, #modelGroup)]
local Model = PickedModel.BackgroundTransparency
Model.Name = "BuyItemSelected"
end
if game.Players.LocalPlayer.PlayerGui.StoreGui.Welcome.Items:FindFirstChild("BuyItemSelected") then
	local Chosen = game.Players.LocalPlayer.PlayerGui.StoreGui.Welcome.Items.BuyItemSelected
wait()
Chosen.BackgroundTransparency = 0 -- [0.5] is Default
wait(5) -- (.05) for smoother "Flashing"



end

2 comments

0

Please put this in a code block, it makes our life a lot easier!

0

Just figured out how...sorry