[SOLVED] Any way to prevent text from shaking?
Asked by
6 years ago Edited 6 years ago
So I have this text label and the text in the label shows a timer like this min:sec:hundredths. But the text in the label shakes because the size of the characters in the text are different. I've seen games like Speed Run 4 where there is a timer and the text doesn't shake. Is there any way to fix this?
01 | players = game:GetService( "Players" ) |
02 | runs = game:GetService( "RunService" ) |
07 | repeat runs.RenderStepped:Wait() until players.LocalPlayer |
08 | plr = players.LocalPlayer |
09 | repeat runs.RenderStepped:Wait() until workspace:WaitForChild( "Data" ):WaitForChild(plr.UserId):WaitForChild( "Stage" ).Value ~ = 0 |
11 | local starttime = tick() |
17 | runs.RenderStepped:Wait() |
18 | ttime = math.ceil((tick()-starttime)* 1000 )/ 1000 |
19 | undersec = string.sub(ttime,string.len(ttime)- 2 ,string.len(ttime)- 1 ) |
20 | sec = math.floor(ttime) |
21 | min = math.floor(sec/ 60 ) |
25 | if min > 0 then sec = sec-(min* 60 ) end |
26 | if string.len(min) = = 1 then m 0 = "0" end |
27 | if string.len(sec) = = 1 then s 0 = "0" end |
28 | if string.len(undersec) = = 1 then u 0 = "0" end |
29 | script.Parent.Time.Text = m 0.. min.. ":" ..s 0.. sec.. ":" ..u 0.. undersec |
31 | totaltime = math.ceil((tick()-starttime)* 1000 ) |
33 | workspace.Events.REs.Save:FireServer( "Ok*m>J^U$#$%^&*ikjnbf!Q#$TYHN" ,totaltime, "Stage" ..stage.. "Leaderboards" , true , false , false ) |
36 | workspace.Data [ plr.UserId ] .Stage.Changed:Connect( function (val) |