Introducing an Engine-Level Model Scale API [Beta]

By the way, I see the bug reports here. I’m going to do a pass on them soon, hold tight.

4 Likes

Came here to report client physics issues with ScaleTo method. Glad that I’m not the only one experiencing those.

2 Likes

My solution to solve this is to handle Character:ScaleTo() on the client and just use remote events to tell each client to update. The only problem is you have to somehow handle the character on the server using a different way, as the scaling obviously doesn’t replicate to the server. Probably not much of an issue and I predict this issue will be solved within a week or so.

Regardless I think I might wait until this issue is fixed before releasing my game to avoid further issues.

1 Like

From my experience, setting scale on the client will also cause physics issues due to network ownership of the character. Even if you don’t tell the server nor other clients to replicate it.

Well I’m changing it in a local script, and there’s zero issues. Although, they might have changed it’s functionality in the past few days.

Probably a dumb question to ask but is there anything for changing a model’s default scaling to 1 without having to ungroup/regroup a model? I have a bunch of models that aren’t scaled equal to 1 and I don’t want to have to ungroup & regroup each individual model just to reset their scale to 1 with the size they’re currently at.
RobloxStudioBeta_chZPIvka9l

There isn’t a way right now but I’m considering adding one. I’m interested what the workflow reason where you want to do a mass reset is. Is it that you made a bunch of copies of props without paying attention to the scale and need a way to reset them all back?

You can automate it with a script if you need a solution at the moment. This could be run using the “Run Script…” command in the Model tab:

for _, desc in workspace:GetDescendants() do
    if desc:IsA("Model") then
        local children = desc:GetChildren()
        for _, ch in children do ch.Parent = nil end
        desc:ScaleTo(1)
        for _, ch in children do ch.Parent = desc end
    end
end
game:GetService("ChangeHistoryService"):SetWaypoint("Reset Scale")
2 Likes

Actually, it’s probably better if I explain it with a video

  • If you take a model and manually scale it down, it also scales the model’s Scale value to whatever you shrunk it to (to be expected)
  • ungrouping & regrouping the model would reset the scale back to 1 but at the size of what it was set to

The game I’m using these models in has a ‘scale’ tool that basically lets you scale up models to a value of choice, but the builder wasn’t aware of this new scale thing being added so it’d cause unexpected scaling issues like props being WAY too big because their scale was something tiny like 0.16 being bumped up to a size of 2.

Wait, so I’m a bit unclear now. Is what you’re looking for a better way to do this programmatically at runtime in the building game, or at edit time in the Studio UI?

I also looked at support for this.

For me I wanted to use it for adjusting character scale. When a skinned mesh is imported from blender, sometimes the scale isn’t quite right. It has to be rescaled slightly to fit with the other models in game.

Ideally the rescaled character would then have a scale of ‘1’ so we can more easily make it work with dynamic growth.

Definitely not a dealbreaker, but does make it so we have to keep track of what the original ‘max scale’ was at. I.e. the scale the character grows towards.

An official method to set the scale would be handy.

Editing would be useful at least in my situation, I don’t have much experience in scripting stuff but I think it’d still be useful to have something code-wise for whoever else needs it

It looks like scaling character on the server is now bug free? I noticed when I switched to the server it doesn’t have any issues :‎O

Will there be option to reset model scale factor to 1 while not updating model scale itself?
So for example if i wanna correct default model size, i scale it up and reset factor to 1
It’d be a nice QoL feature

1 Like

Yes, I’m likely going to implement this, but haven’t gotten around to it yet.

The idea is that there will be an “Apply Scale” button in the right of the scale property value box the properties pane similar to how assetIds have an “X” there.

That would handle the mass-reset use case because you could filter for the relevant things with explorer filtering, select them all, and hit the button to do it to all of them.

3 Likes

This update just helped me out! I wanted to add parts on each key on a piano that I made, but with the snap interval being limited to only 3-digit decimal numbers at most, the lack of precision would’ve made this very annoying to do.

I set the scale of the model to 8, and from there could position everything over the enlarged keyboard, then set it back to 1 afterwards, which resulted in this.


(This could also be used to scale down held items for younger characters too, so this won’t be the only time I use this feature.)

This isn’t actually the case!

The visual display on the grid snap box is limited to three digits, but if you enter a very precise number the underlying grid snap which Studio uses will be set to exactly what you entered.

1 Like

Oh… While I was changing that value, I sometimes would vaguely recall reading about that on these forums somewhere (so I would enter 4-5 decimal digit numbers just in case). Well, it’s good to know that really precise decimal numbers are properly handled by Studio. I sometimes use 0.0625, typing the full number into that text field, so I like knowing that it’s only visually rounding it to 0.063.

The forum wasn’t wrong. This changed relatively recently about 3 months ago. Prior to that the grid snap had a maximum granularity of 0.01 regardless of what you entered.

If you run ScaleTo while a Humanoid has a new Description being applied there appears to be some sort of Scale desync issue!

Applying Humanoid Description on Scaled Humanoids causes Scale Issues - Bug Reports / Engine Bugs - Developer Forum | Roblox

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.