So my code looks like this :
while wait() do
if game:GetService("Workspace").Map then
codeeeee
else
print("ok")
end
end
Output :
Map is not a valid member of Workspace
Shouldn't it print ok until the map spawns in?
So my code looks like this :
while wait() do
if game:GetService("Workspace").Map then
codeeeee
else
print("ok")
end
end
Output :
Map is not a valid member of Workspace
Shouldn't it print ok until the map spawns in?
I don’t know if this is the “right” way to do it but I usually use
if workspace:FindFirstChild(“Map”) ~= nil then
else
end
This works for me...
Just change the code to:
while wait() do
if workspace:FindFirstChild("Map") then
--codeeeee
else
print("ok")
end
end
Doesn't work
Any errors? Where is your script located?
works for me
I think FindFirstChild returns nil if there is no child with that name.
So maybe nil does not equal false or true and causes an error?
It works for me
what about workspace.Map? i think that shoudl work right?
Erie20, workspace.Map wont work, but the strange thing is that my way dont worked for him which is kinda strange cuz it should work (Cuz im always using that way and its working for me)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
let me try
it works tysmmmmmm