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

SurfaceGUI and Math Help Again?

Asked by
Rurith 10
10 years ago
V=0
function Touched(Plr)
if game.Players[Plr.Parent.Name]~=nil then
V=V+1
end

function Ended(Plr)
if game.Players[Plr.Parent.Name]~=nil then
V=V-1
end

script.Parent.Touched:connect(Touched)
script.Parent.TouchEnded:connect(Ended)

local var = 0
repeat
wait(0.1)
script.Parent.Num.SurfaceGui.status.Text = V
until var==10
end
end

Layout: http://gyazo.com/056e12737a10ba98cf8c438dd7d07688

It will only show a 30, I need the script to +1 on the TEXT of the SurfaceGUI each time a player is on the Brick. But, it only shows a 30 (http://gyazo.com/4866a3ba6b77d6e32595561f360d796b)

1 answer

Log in to vote
0
Answered by
OniiCh_n 410 Moderation Voter
10 years ago

Use loops.

Ad

Answer this question