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

Why Won't My Roblox Text Local Script Work?!?! (I've Named The TextLabel Noob Btw) [SOLVED]

i've done everything correctly as far as i know but it is still not working!!!!!

Heres The Script:

game.StarterGui.ScreenGui.VirusContinues.Noob.Text = "1%"

wait(2) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "2%"

wait(2) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "3%"

wait(2) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "4%"

wait(4) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "25%"

wait(3) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "50%"

wait(3) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "75%"

wait(5) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "100%"

wait(1) game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "Virus Injected!"


Please Help Me If You Know How To Help Me Fix It!

3 comments

0

First off, can you edit your post and put it in a code block by clicking the blue circle that says lua?

0

Was this created with malicious intent? :thinking:

0

@TheeDeathCaster, sorry for the late response. No this wasn't, as you can see its a simple GUI and nothing malicious. I was just into viruses and things at the time. Plus if past me couldn't do this what makes you think that I could code an entire virus.

4 answers

✓ Accepted answer

you can't edit startergui with a localscript; starter gui inserts into > game.Players.LocalPlayer:WaitForChild("PlayerGui") if you want to edit it better, insert a localscript into the textlabel named noob and just do

script.Parent.Text = "1%"

wait(2) script.Parent.Text = "2%"

wait(2) script.Parent.Text = "3%"

wait(2)script.Parent.Text = "4%"

wait(4) script.Parent.Text= "25%"

wait(3) script.Parent.Text = "50%"

wait(3) script.Parent.Text = "75%"

wait(5) script.Parent.Text = "100%"

wait(1) script.Parent.Text = "Virus Injected!"

6 comments

0

Hmm still not working

0

Nvm it worked! Thank You!

0

But Also How would you make the frame Be invisible When Completed

0

use a for loop

0

What do you mean?

0

for i = 1,100 do script.Parent.Text = i.."%" wait() end

game.StarterGui.ScreenGui.VirusContinues.Noob.Text = "1%"

wait(2)

game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "2%"

wait(2) 

game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "3%"

wait(2) 

game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "4%"

wait(4) 

game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "25%"

wait(3)
 
game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "50%"

wait(3)
 
game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "75%"

wait(5) 

game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "100%"

wait(1) 

game.StarterGui.ScreenGui.VirusContinues.Frame.Noob.Text = "Virus Injected!"

as the other answers answered the main problem, you can use numeric for loop to make your code more compact and easier to read.

ex

local label = script.Parent

for i = 1,4 do
	label.Text = i.."%"
end
for i = 25,100,25 do -- increment it by 25
	label.Text = i.."%"
end

Oh, well the problem here is that you are editing the StarterGui. You need to edit the PlayerGui.

Change game.StarterGui to

game.Players.LocalPlayer.Playergui

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