for example;
like
if game.Workspace:FindFirstChild("Model") .. checking if model is in the workspace then end elseif code here end
sorry for the rookie question, I just can't think of anything rn.
also could you use isdescendantof? http://wiki.roblox.com/index.php?title=API:Class/Instance/IsDescendantOf
IsDescendantOf()
which returns true if the object is a descendant of the given ancestor.if Model:IsDescendantOf(Workspace) then -- Code end
~UserOnly20Charcters, Hoped I helped you to answer your question! If you have any further question, don't hesitate to comment below!!
There is a way! You have to use a loop.
Here is an example:
local modelinworkspace = false--Change this to any variable if you want for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == "ModelName" then--Change this to your model name modelinworkspace = true else print("Model not in workspace")--Just an example, this is not needed end
Hope this helped! If it did, please accept my answer, it gives us both rep!