Similar to placing a SpecialMesh in a Part, I am trying to place a SpecialMesh in either a Union or another Mesh. This is for a claw machine prize, where the prize has a specific shape appearance, but really is a spherical shape.
I originally placed the SpecialMesh in a sphere, but it rolls around. Using the other available BaseParts don’t fit the situation I’m using it for.
Is this possible, and if so, how can I achieve this?
To place a SpecialMesh inside a UnionMesh, you can’t directly parent the SpecialMesh to the UnionMesh, as UnionMesh does not support child objects. However, you can use the UnionMesh.Meshes property to add the SpecialMesh as a mesh to the UnionMesh.
Im also not really sure what you’re trying to achieve, OP.
If the claw machine claw picks up a mesh, it uses that mesh shape. I want to place that mesh inside another shape so that the claw uses the shape’s shape rather the the mesh’s shape.
It’s like grabbing a cube, but in reality, it is a sphere.
What are you trying to achieve from this? Custom hitboxes?
Can’t you just have a MeshPart and change the mesh accordingly? One or two of the collision fidelity options could make the hitbox fit closer to the mesh shape itself.
Edit: Oh I just saw what you’re asking.
Parts can have a SpecialMesh applied to them to give them the visual appearance of a mesh while retaining their hitbox.
This can also be done to Unions, but not MeshParts and adjacent classes.
In the worst case scenario, you could always have a mesh with the hitbox you want, make it invisible, and attach/weld a mesh without collisions to it for the visible side. Anything past that would be changing either mesh accordingly for different hitboxes or appearances.
Can’t you just Export the Part with the SpecialMesh in it, then load it into Blender to make a MeshPart that’s the actual shape of the SpecialMesh?
Either that or weld a simple MeshPart from the Toolbox that’s Transparent and CanCollide true to the Part with the SpecialMesh in it which would be CanCollide false.