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

How could wait() be more efficient?

Asked by 10 years ago

Is their a way to make it so like say the player get 25 xp then 50 then 55 then the text clears. Instead of 25 then it waits and does not show 50 or 55.

local ExperiencePLAYER = script.Parent.Parent.Parent.Parent.Parent.ExperiencePLAYER

Old = ExperiencePLAYER.Value
ExperiencePLAYER.Changed:connect(function()
Difference = ExperiencePLAYER.Value - Old
if Difference > 0 then
script.Parent.Text = "+"..Difference
else
script.Parent.Text = Difference
end
coroutine.wrap(function()
wait(1)
script.Parent.Text = ""
end)()
Old = ExperiencePLAYER.Value
end)
0
Please give a clearer explanation of what it is you're asking BlueTaslem 18071 — 10y
0
If someone is on a killing spree or killing pretty fast then it should say for example: +25, + 50, + 75. But for now it says +25 then all the others don't count up. peoplemove12 148 — 10y

Answer this question