Ability to create ScaleParameters for the :ScaleTo() function

As a Roblox developer, it is currently too hard to customize what is scaled with the new :ScaleTo() function added to Models. Currently, many properties of its descendants get scaled like Humanoid properties, ParticleEmitter properties, Sound Properties, etc. Some specific properties might not be desired to be changed by the developer. For example, this is a demonstration on how it can be used, similar to RasycastParams:

local ScaleParams = ScaleParams.new()
ScaleParams.FilterType = Enum.ScaleFilterType.Exclude
ScaleParams.FilterDescendantsInstances = {Humanoid.WalkSpeed,ParticleEmitter.Size}
Model:ScaleTo(2,ScaleParams)

If Roblox is able to address this issue, it would improve my development experience because developers will be able to customize the usage of the new Scale function without having to add workarounds to the many properties that Scale changes in its descendants.

17 Likes

I understand what you’re trying to do here, but this list would be full of numbers and other datatypes, and not the property names. There’s probably another way to address what properties to exclude.

Also, the name FilterDescendantsInstances doesn’t really make sense when it’s properties and not instances with descendants.

How about this?

ScaleParams:AddToFilter("WalkSpeed")
ScaleParams:AddToFilter({"JumpPower", "WalkSpeed"})
10 Likes

Or maybe have a proprety that looks like that:

ScaleParams:WhitelistMode(true)
ScaleParams:AddToWhitelist({"CoolProprety1", "CoolProprietary2"})
4 Likes

That wouldn’t be consistent with other params datatypes.

7 Likes

I would love to have this as a feature, currently trying to use the ScaleTo feature to make a growth cycle for animals but with everything in humanoid scaling it is a bit tedious to work around, especially the WalkSpeed and JumpPower properties. Would love to have a way to both whitelist and/or blacklist certain properties from being scaled.

1 Like

At present, I’m utilizing a customized character within my game, necessitating occasional scaling adjustments, including during animation execution. However, an issue arises when attempting to scale the character while it’s in motion, resulting in erratic behavior and severe glitches. This functionality is pivotal to my game’s mechanics, and as far as I’m aware, there exists no other feasible method besides employing the ScaleTo function (which also involves scaling the animations).

To enhance its usability, it would be highly advantageous if the ScaleTo function incorporated a blacklist feature, allowing us to specify properties that should be exempt from scaling. This addition appears crucial for making the ScaleTo feature more universally applicable and robust.

In the meantime, I’m compelled to create a custom function to address this issue…

3 Likes

I ran into the need for this in a project so I’ll share my usecase.

In our game we have abilities, one of which is the ability to scale a character up (“grow”).

We ran into an issue though – because there is no way for :ScaleTo to ignore certain properties, the humanoid’s WalkSpeed was incremented. Thus we had to make a hacky solution that listens for the humanoid’s WalkSpeed to change and then overwrite it. If we had something like ScaleToParams, we wouldn’t have to rely on this boilerplate solution. It’s ugly and seems very hacky.

Alternative suggestion for API (mostly inspired by Sequences where you can pass an array of keypoints [in this case being ScaleToParamsProperties instead of the keypoints], and of course RaycastParams/OverlapParams):
ScaleToParams.new()
ScaleToParams.Properties: { ScaleToParamsProperties }
ScaleToParams.FilterType: Enum.RaycastFilterType
ScaleToParams:AddToProperties(scaleParamsProperties)

And for the ScaleToParamsProperties:
ScaleToParamsProperties.new(className: string, properties: { string })

This solves the issue of not being able to specify which classes you’d want to ignore (in the case of wanting to ignore an ambiguous property shared between two classes)

2 Likes

Please get back to me if you figure this out. I’m in the process of making a Mini and Mega Mushroom inspired power-up based on Mario, and the only thing I’ve figured to do is just do something like

	Player.Character.Humanoid.WalkSpeed += 15 
	Player.Character.Humanoid.JumpPower += 37.5

but ofc it’s not perfect, especially for characters with a different speed and jump height to my default.