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

Can anyone help with this cash system?

Asked by 8 years ago

Okay so using tostring to make a Value become 2.00 instead of 2. I have been trying for a while to make it go the was I wanted it to go and it wouldn't work, at first I used a for loop and the same thing is happening. So far, I haven't seen no error, it is just not coming out as 2.00 instead of 2 the way I wanted it.


local Cash = script.Parent.Cash local CashL = script.Parent.CashL local Pay = script.Parent.Pay local PayL = script.Parent.PayL local Time = script.Parent.Time local Paytime = 60 local Teams = { "Uniondale Police Department", "Uniondale Department of Public Safety", "Uniondale Department of Transportation and Maintenance", "Uniondale Developers", "UnionDale Department of Justice", "Citizens", "Uniondale Department of Corrections", "Uniondale Department of Homeland Security", "Uniondale National Guard", "Visitors" } local TeamsPayAmount = { 10.00, 9.00, 9.00, 13.00, 11.00, 5.00, 11.00, 12.00, 15.00, 2.00 } --Pay System-- --Visitor Pay-- if game.Players.LocalPlayer.TeamColor == BrickColor.new("Smoky grey")then Pay.Value = TeamsPayAmount[10] PayL.Text = "Pay Amount: "..Pay.Value tostring(Pay.Value) end

1 answer

Log in to vote
0
Answered by 8 years ago

on line 42, try using this line instead:

PayL.Text = ("Pay Amount: "..Pay.Value..".00$")
0
Although sometimes something in the county may be $45. 50 or $25. 76 I need those cents to be there not 00. But thank you! FederalJustice 35 — 8y
0
make another string for cents value and make it like: FlaminSparrow 65 — 8y
0
("Pay Amount: "..Pay.Value.."."..Cent.Value.."$") FlaminSparrow 65 — 8y
0
Okay I got you let me test the things out. FederalJustice 35 — 8y
Ad

Answer this question