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

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

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 comment

1

Have you made sure "SpawnLocation" exists? Also, PLEASE use code blocks!!!!

1 answer

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

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