Mesh Native Size

Get the native size of a mesh!

To allow players to insert their own meshes and making sure they aren’t too big or small.

I’m toying around with the idea of players being able to insert MeshIDs into Mesh objects via a TextBox.


Problem is, that meshes scale very differently, one mesh at scale (1,1,1) could be much bigger than another mesh at scale (1,1,1)


Two meshes, same part size, same scale, different MeshIDs.

Sword MeshID: rbxassetid://2956095681
Hair MeshID: http://www.roblox.com/asset/?id=19999424


I’ve tried using MeshParts, but sadly it won’t let me change the MeshID during runtime.
image
Me attempting to change a MeshId from the ReplicatedFirst.

Code:

local meshpart = Instance.new("MeshPart")

meshpart.MeshId = "rbxassetid://2956095681"

meshpart.Parent = workspace

The last idea I can think of is letting players submit MeshIDs to be manually reviewed by me. But all I’d be checking for is just native size. I really don’t want to do this.


If any of you have any ideas on how I could make it so I can allow players to add meshes into the game and be able to keep them from being horribly big or horribly small, it’d be much appreciated!

1 Like

Couldn’t you just have premade mesh parts in your game to avoid obtaining custom meshes from players? Why do you need players to be able to insert custom meshes?

Please add more information.

What do you mean why do you need players to be able to insert custom meshes?

Since the dawn of Roblox creativity has been the foundation of many games. People already have loads of fun just resizing and moving square blocks to make houses, imagine the potential if players could insert meshes, adding things like barrels, paintings, whatever you can imagine into those houses for example. Pre-made assets only go so far.

I don’t see how #help-and-feedback:game-design-support would help me solve this problem at all. This is a technical issue, not a design issue, there is something actively preventing me from implementing this feature.

You aren’t able to check the native size of a mesh because you don’t have access to mesh data. MeshParts cannot have their mesh changed at run time, so using the new size of the MeshPart to check the size of the mesh is out too.

I’m asking because I wouldn’t be so sure what to suggest if I didn’t know specifically why you’re allowing players to insert custom meshes.

My bad :face_with_hand_over_mouth:


Setting those aside, it seems that you’re making a building game. In that case, why not just let players set the size of meshes manually? There currently really is no way to check how big a mesh is in-game.

Whoops! I thought you were replying to my post in #platform-feedback:engine-features here! My bad!

The reason why I don’t want players to have super large meshes is because it can effect other players. This is harmful to the experience because some meshes obscure vision, like meshes that have textures inside them.

@colbert2677 I’m just wondering if anyone found a way to do this, like say, inserting MeshParts into the ReplicatedStorage prior to Runtime.

If anyone knows anything on how to do this, I would think they’d be on the DevForums. I have already made a feature request, but I’m curious if anyone has any wacky solutions in the meantime. Wouldn’t be the first time I found a really cheesy way to fix an issue that seemed impossible.

If you want to insert every single MeshPart on Roblox and convert every SpecialMesh to a MeshPart then yes you could probably do this lol. Otherwise no, what you’re suggesting is impossible.

1 Like

That’s…
Not a bad idea…:thinking:

I hope that’s a joke.

If not: that’s an absolutely terrible idea and it was really only meant to be hypothetical. Don’t actually do this because you’re going to experience some bad side effects in relation to memory consumption for static unused objects on both environments. That’s a recipe for disaster for your players and even you too.

What if you put it in a folder inside of ServerStorage that just holds many, many MeshPart objects?

Wouldn’t they be pre-loaded once the server finishes loading up?

I’m just saying that solution isn’t impossible. Just like how the other solution isn’t impossible:

I’m just saying, as crazy as it sounds, you’re right, hypothetically it could work.

Okay, so you’re serious. And that’s not a good thing. I’ll reply this once and not again.

The contents of ServerStorage will not replicate to the client, so the meshes won’t load at all. The client actually needs to be able to see the meshes to download and use them. Yes, hypothetically in some odd world you can just put them in ServerStorage and then check size, but now you incur heavy server memory use to hold those parts.

You have no way to query every single mesh accurately either. This is the kind of list that, without exaggeration, updates every minute or less.

1 Like

I was thinking of doing both solutions, in theory.

Getting a bunch of meshes, putting them in the ServerStorage, and if a player wants to use a mesh, it accesses the ServerStorage, if that mesh exists in there, then it clones that mesh and parents the clone to the Workspace. If it does not exist, then maybe once per day the player could send me a “request” to add that mesh to the ServerStorage.

In theory.

2 Likes