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 check if a name is equal to a value to change a GUI text?

Basically I'm try to make a random tip generator as efficient as possible where I can add tips in without changing the script. here is what I got

Tips=script.Parent.Holder
Words=script.Parent.Tip.Text
randomizer=math.random(1,5)

Words= --This is where I am having trouble.

script.Parent.Parent:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 1, true) --ignore this tween, it works just fine
wait(1)

and if you'd like a picture of the values: http://imgur.com/NwtkbWS

1 answer

Well you can always have a table of tips that continuously displays them

--Table of tips to loop through
words = 
{
"Tip1"
}

--Continuously looping through and printing tips
coroutine.resume(coroutine.create(function()
while true do
wait()
for i,v in pairs(words) do
print(v)
end
end
end))

2 comments

0

Am I able to make it pick a random tip from words instead of playing the first tip always?

0

Of course, do you want me to implement that?

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