I’ve been working on a tire wear GUI and I got the tire wear script and the GUI but I don’t know what script to put inside the GUI so it shows how much percent the tires still have left. Anyone know what script I should do?
If you want to know what percent A is of B, you simply divide A by B, then take that number and move the decimal place two spaces to the right (multiply with 100).
You can use this formula in your script to find the percentage
local currentWear = 5
local maxWear = 300
local percentage = 5/300 * 100
or better yet
local perecentage = currentWear/maxWear * 100
Is that all I gotta do (I’m not really good at scripting)
No, this is just how you get the percentage. To actually make your tire wear out, apply the changes to gui and etc. you need to learn scripting, because if we do all that for you why dont we just make the whole game)))
I don’t need to change anything within the tire wear script though right? while true do if script.Parent.Parent.VehicleSeat.steer < 1 then script.Parent.Friction= script.Parent.Friction- 0.03 end wait(18) end
sorry but we cant hand out scripts we can just make the base so what you can do is
get the property changed signal using :GetPropertyChangedSignal of the “Throttle” and then use if statement to see if the throttle is 0 or NOT then you can make a bool value which you made and make it true below everything add a while loop with wait of as long as you want then just decrease the wear by 1 or any number as long as its not the max wear