You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I wan’t to check if the instance is not a “Part” -
What is the issue? Include screenshots / videos if possible!
It seem like that the roblox api reference doesn’t have this and I don’t know what to do. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried to find a ways to do it on devforum but I can’t seen to find anythings at all
Here a part of my code
local debug_ = {strict_rule={ClassName = true}}
function ChangeMesh(Parent,ID)
local mesh = nil
if Parent:IsA("Part") and Parent:FindFirstChildWhichIsA("SpecialMesh") then
mesh = Parent:FindFirstChildWhichIsA("SpecialMesh")
elseif Parent:IsA("Part") then
mesh = Instance.new("SpecialMesh")
mesh.Parent = Parent
else
print("Parent is not a part")
end
mesh.MeshId = "rbxassetid://".. ID
return mesh
end