You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
the ui to be the percent of score depended of the other team -
What is the issue? Include screenshots / videos if possible!
blue has 1 point but the ui says he has 0 -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
the other way / and that comment
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
red = game:GetService('Teams').Red.ScoreInt
blue = game:GetService('Teams').Blue.ScoreInt
while true do
game:GetService('RunService').Heartbeat:Wait()
red2 = red.Value
blu2 = blue.Value
local winPercentRed = math.clamp(math.max(red2,blu2)/math.min(red2,blu2),0,1)
local winPercentBlue = 1-winPercentRed --math.clamp(blu2/red2,0,1)
print(blu2,red2,'print',winPercentRed, winPercentBlue)
if winPercentRed == winPercentRed and blu2~=red2 then
UDimR = UDim2.fromScale(winPercentRed,1)
UDimB = UDim2.fromScale(winPercentBlue,1)
script.Parent.Red.Size = UDimR
script.Parent.Red.Text = 'Red: '..red2
script.Parent.Blue.Size = UDimB
script.Parent.Blue.Text = blu2..' :Blue'
else
UDimR = UDim2.fromScale(0.5,1)
UDimB = UDim2.fromScale(0.5,1)
script.Parent.Red.Size = UDimR
script.Parent.Red.Text = 'Red: '..red2
script.Parent.Blue.Size = UDimB
script.Parent.Blue.Text = blu2..' :Blue'
end
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.