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

Issue with non-existing instance?

Asked by 8 years ago
_G.NewCoaster = function(name)
    if name~=nil then
    if workspace:FindFirstChild("Coasters") then
    --code
    end
    --code
    end
end

I run this function through my plugin, but even when the "Coasters" instance isn't in workspace, the code runs. I am completely lost, as this usually works other times when I do something similar. Any help will be greatly appreciated. :)

Answer this question