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

"while nono <5 do" code not working doesn't want to change properties to a SpawnLocation?

Asked by 4 years ago

I have written the following code:

local nono = 1 while nono <5 do game.Workspace:FindFirstChild ("SpawnLocation"). Transparency = 1 wait (0.5) game.Workspace:FindFirstChild ("SpawnLocation").Transparency = 0 wait (0.5) end

my goal is to make the SpawnLocation visible and invisible. Why isn't this working

1
Have you made sure "SpawnLocation" exists? Also, PLEASE use code blocks!!!! Hacreey 49 — 4y

1 answer

Log in to vote
0
Answered by
EDLLT 146
4 years ago

Uh there you go

Use a code block next time

local nono = 1 
if not game.Workspace:FindFirstChild("SpawnLocation") then
    Instance.new("SpawnLocation",workspace)
end
while nono<5 do 
    game.Workspace:FindFirstChild("SpawnLocation").Transparency=1
    wait(0.5) 
    game.Workspace:FindFirstChild("SpawnLocation").Transparency = 0 
    wait (0.5) 
end
Ad

Answer this question