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

why wont my basic flashing image script work ?

Asked by
oziase 1
4 years ago
Edited 4 years ago

so im making a horor game and i need a flashing image so i made a image label and put a script in it

    while true do`  

    script.Parent.Visable = false
    wait(5)
    script.Parent.Visable = true
    wait(0.9)
end`

but it wont work the image just stays visible

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Here, let me fix some problems for you:

while wait(0.9) do
    script.Parent.Visible = false
    wait(5)
    script.Parent.Visible = true
end

First error is that it is Visible instead of Visable. Second, not error but saves lines of codes, is that you don't need to add the wait() at the end because you can place it inside the while statement.

Also, quick tip, never use while true do without any wait() in the code as it will run very very fast and will lag out your game.

Ad

Answer this question