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

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

Asked by
hoth7 45
5 years ago
Edited 5 years ago

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!

0
First off, can you edit your post and put it in a code block by clicking the blue circle that says lua? Nezuo 0 — 5y
0
Was this created with malicious intent? :thinking: TheeDeathCaster 2368 — 5y
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. hoth7 45 — 4y

4 answers

Log in to vote
0
Answered by
Imperialy 149
5 years ago

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!" ~~~~~~~~~~~~~~~~~

0
Hmm still not working hoth7 45 — 5y
0
Nvm it worked! Thank You! hoth7 45 — 5y
0
But Also How would you make the frame Be invisible When Completed hoth7 45 — 5y
0
use a for loop User#23365 30 — 5y
View all comments (2 more)
0
What do you mean? hoth7 45 — 5y
0
for i = 1,100 do script.Parent.Text = i.."%" wait() end ee0w 458 — 5y
Ad
Log in to vote
0
Answered by
Mr_Unlucky 1085 Moderation Voter
5 years ago
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!"
Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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
Log in to vote
0
Answered by 5 years ago

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 ~~~~~~~~~~~~~~~~~

Answer this question