local 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:
local ts = game:GetService("TweenService")
local p1 = script.Parent.Parent.rollmove.RI
local p2 = script.Parent.Parent.rollmove.RII
local box = script.Parent.Parent.rollmove.Box
local click = script.Parent.ClickDetector
local dicee = script.Parent.Parent.rollmove.dice:GetChildren()
local dice = script.Parent.Parent.rollmove.dice
local dicenum = #dicee
local 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
for i = 1,dicenum do
local diceget = dicee[i]
diceget.Anchored = true
end
local default_dist = script.Parent.ClickDetector.MaxActivationDistance
script.Parent.ClickDetector.MouseClick:Connect(function(player)
game.ReplicatedStorage.Roll:FireAllClients()
script.Parent.ClickDetector.MaxActivationDistance = 0
script.Parent.SurfaceGui.Rolling.Visible = true
script.Parent.SurfaceGui.Roll.Visible = false
wait()
local function moveItem(item, wp)
local ti = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local tween = ts:Create(item, ti, { Position = wp.Position})
tween:Play()
wait(2)
end
local function moveItems(item, wp)
local ti = TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local tween = ts:Create(item, ti, { Position = wp.Position})
tween:Play()
wait(0.1)
end
for i = 1,dicenum do
local diceget = dicee[i]
moveItems(diceget, p1)
end
moveItem(box, p1)
for i = 1,dicenum do
local diceget = dicee[i]
diceget.Transparency = 1
moveItems(diceget, p2)
end
moveItem(box, p2)
box.Orientation = Vector3.new(0,180,180)
for i = 1,dicenum do
local diceget = dicee[i]
diceget.Transparency = 0
diceget.Anchored = false
end
display.Enabled = true
wait(6)
for i = 1,dicenum do
local diceget = dicee[i]
diceget.Anchored = true
diceget.Transparency = 1
moveItems(diceget, p1)
display.Enabled = false
end
moveItem(box,p1)
box.Orientation = Vector3.new(0,0,0)
script.Parent.SurfaceGui.Rolling.Visible = false
script.Parent.SurfaceGui.Roll.Visible = true
script.Parent.ClickDetector.MaxActivationDistance = default_dist
end)

6 comments
Very helpful!
Thanks!
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
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.
oh ok thanks for the info
reference: https://developer.roblox.com/en-us/articles/Operators