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

Why isn't this gui working? [closed]

Asked by 9 years ago

Okay I have this really long script. But I only need help with one part. This script chooses your name based on what button you choose, boy or girl. What I need help with is the bottom part of the script.

FirstNameMale = {"John", "Andrew", "Steven", "Bob", "Joseph", "Sebastian", "Noah", "Jordan", "Eric", "Liam", "Owen", "James", "Jason", "Kyle", "Mario", "Paul", "Rick", "Martin", "Mike", "Michael", "Jack"}
FirstNameFemale = {"Jane", "Barbra", "Andrea", "Ann", "Annie", "Juno", "Audrey", "Mary", "Chloe", "Emily", "Maya", "Sarah", "Isabelle", "Kate", "Megan", "Brook", "Ashley", "Lucy", "Katy", "Abby", "Christina"}
LastName = {"Doe", "Johnson", "Johnston", "McDonald", "Anderson", "Parker", "Stevenson", "McGee", "Davis", "Smith", "Brown", "Jones", "Hooper", "Duke", "Rich", "Michael", "Martin", "King", "Sullivan", "Marley", "Shedletsky"}

--This part down.
        local gui = script.Parent.TextLabel
        local textbox = script.Parent.Girl.TextTransparency and script.Parent.Boy
for i = 1,0,.1 do
    wait(.25)
    gui.TextTransparency = i
    gui.TextStrokeTransparency = i
    guibox.BackgroundTransparency = i
    guibox.TextTransparency = i
    guibox.TextStrokeTransparency = i
end

It changes the transparency too fast or something because I can't notice it doing anything. It immediately turns invisible.

Locked by EzraNehemiah_TF2, Redbullusa, and M39a9am3R

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
9 years ago

Your problem is this line:

for i = 1,0,.1 do

Remember that increment is added to i each time the loop...loops. If you do 1 + 0.1 you're not going to get any closer to 0.

To get closer to your goal, 0, you must subtract 0.1 from i every time.

There is no way to make for loops subtract the increment, but basic arithmetic tells use that a - b = a + (-b)

Therefore you just need to make 0.1 negative.

for i = 1,0,-0.1 do
0
Herp Derp me. EzraNehemiah_TF2 3552 — 9y
Ad