Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I am not understanding why my loop is not outputting anything taking in the factthatitshouldbework ?

This loop doesn't output anything

local g = "Times"
local number = 1
local texts = game.StarterGui.ScreenGui.TextLabel

while number < 50 do
	Instance.new("Part",workspace)
	print(g,number)
	wait(0.2)
	number = number+1	
end

while true do                --THIS LOOP
	print("works")
	texts.Text = "parts =", tostring(number)  --use tostring
	wait(1)
end

2 comments

0

Have you tried using while true do? Or RunService.Stepped?

0

here is the original script with while true and still doesn't output

2 answers

✓ Accepted answer

Your script isnt running at all!!!!!!!!!!!

I suspect it is a LocalScript, and if so, note that they only run inside either the Player, the Character, or inside the Player Service. If they are not parented to any of them, they won't budge at all

2 comments

0

bcaon fries

0

actually! the problem was that the script was in the workspace and not inside the gui it's self so the script was changing the server's gui not the copy that the player got. anyway ima accept your answear when you respond

You cannot run 2 while loops in the same script. You have to find a different way to run both of those loops.

1 comment

0

still doesn't work

This discussion is preserved as it was. New answers, comments, and votes are closed.