How can I use two variables and determine which one is and which one is not,
local a = workspace:FindFirstChild('Spawn') or workspace:FindFirstChild('Spawn2') or workspace:FindFirstChild('Spawn3')
if a == 'Spawn' then
or a == 'Spawn2' then
or a == 'Spawn3' then
end
Will it work? If there is no truth for the first variable?
There is a keyword called elseif which executes if the previous statement was false.
local a = workspace:FindFirstChild('Spawn') or workspace:FindFirstChild('Spawn2') or workspace:FindFirstChild('Spawn3')
if a == 'Spawn' then
elseif a == 'Spawn2' then
elseif a == 'Spawn3' then
end
local a = workspace:FindFirstChild('Spawn') or workspace:FindFirstChild('Spawn2') or workspace:FindFirstChild('Spawn3')
if a then
if a.Name == "Spawn" then
elseif a.Name == "Spawn2" then
elseif a.Name == "Spawn3" then
end
end