Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Do I check if a name is equal to a value to change a GUI text?

Asked by
Seenit 80
10 years ago

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

Log in to vote
2
Answered by
Lacryma 548 Moderation Voter
10 years ago

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))

0
Am I able to make it pick a random tip from words instead of playing the first tip always? Seenit 80 — 10y
0
Of course, do you want me to implement that? Lacryma 548 — 10y
Ad

Answer this question