ylafie
(ylafie)
November 30, 2021, 8:44am
#1
Hello! So I want my script to not show that .75 part. I just need that 193m. But I have no idea how can I do that.
Here’s the script
while true do
wait(0.1)
local mat = game.Workspace.queueposition.Value * 25/60
script.Parent.Text = "Estimated time: "..mat.."m"
end
shariqxD
(shariqxD)
November 30, 2021, 8:50am
#2
script.Parent.Text = "Estimated time: "…math.floor(mat)…“m”
1 Like
ylafie
(ylafie)
November 30, 2021, 8:52am
#3
I’ll test this and I’ll write back to you Thanks.
Forummer
(Forummer)
November 30, 2021, 8:53am
#4
Yeah, you just need math.floor() it’ll remove the decimal part from any number. Alternatively you can use math.round() and it’ll round the number to the nearest integer which is more accurate.
2 Likes
ylafie
(ylafie)
November 30, 2021, 8:53am
#5
Thanks, It did work. I marked your reply as the Solution
1 Like
ylafie
(ylafie)
November 30, 2021, 8:54am
#6
I didn’t know that, I’m kinda bad at scripting. Anyways, thank you for telling me!
shariqxD
(shariqxD)
November 30, 2021, 8:58am
#7
You should explore the math library it will be really useful
ylafie
(ylafie)
November 30, 2021, 9:10am
#8
I’m gonna check it out. Thanks again.