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

How to display all of the Billboard Gui's and not just one?

Asked by 3 years ago
1local display = dice.RI.numdisplay and dice.RII.numdisplay and dice.WI.numdisplay and dice.WII.numdisplay and dice.WIII.numdisplay and dice.WIV.numdisplay and dice.WV.numdisplay and dice.WVI.numdisplay

Whenever I roll my dice, only dice WVI displays its billboard gui, how do I make them all show their billboard gui?

full script if you want to know:

01local ts = game:GetService("TweenService")
02local p1 = script.Parent.Parent.rollmove.RI
03local p2 = script.Parent.Parent.rollmove.RII
04local box = script.Parent.Parent.rollmove.Box
05local click = script.Parent.ClickDetector
06local dicee = script.Parent.Parent.rollmove.dice:GetChildren()
07local dice = script.Parent.Parent.rollmove.dice
08local dicenum = #dicee
09local display = dice.RI.numdisplay and dice.RII.numdisplay and dice.WI.numdisplay and dice.WII.numdisplay and dice.WIII.numdisplay and dice.WIV.numdisplay and dice.WV.numdisplay and dice.WVI.numdisplay
10 
11for i = 1,dicenum do
12    local diceget = dicee[i]
13    diceget.Anchored = true
14end
15local default_dist = script.Parent.ClickDetector.MaxActivationDistance
View all 66 lines...

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

Well hello again! You could use a for loop to go though each of the guis one by one.

Heres a code you could use!

1for i,dicenum do
2  local diceget = dicee[i]
3  local display = diceget.numdisplay
4  -- do whatever you need to get display on to the billboardgui.
5  wait(3)
6end

you see you assigned multiple values to just 1 variable so it will randomly pick 1 value and just display it!

Hope this helped!

Any questions? Just ask!

0
Very helpful! Jakob_Cashy 79 — 3y
0
Thanks! sne_123456 439 — 3y
0
Just to add more info: When assigning more values into one variable, this will get the last value of the variable and it won't actually get the rest.  I don't know for certain why it does that i'd assume, it get's the last value of x because of the logical operators, since it checks to see if the previous values were true which gets the bool values, then it gets the last value JesseSong 3916 — 3y
0
It wouldn't randomly choose 1 variable, it would get the last value. It would only pick a random variable if all of the objects were named the exact same thing, cause the script wouldn't know which one to choose. JesseSong 3916 — 3y
View all comments (2 more)
1
oh ok thanks for the info sne_123456 439 — 3y
Ad

Answer this question