You know the avatar rescaling that Roblox implemented for every player to use? Well there’s some core code behind that, and the coders were nice enough to expose values to allow developers to change at will. You can find the specifics on that here. Anyways you would do something like this:
local scaleFactor = 0.5
part.Touched:Connect(function(part)
--get player based on part
player.Character.Humanoid.BodyDepthScale.Value = scaleFactor
player.Character.Humanoid.BodyHeightScale.Value = scaleFactor
--... and so on for BodyWidthScale and HeadScale
end)
Should rescale automatically. If it doesn’t, double check that Humanoid.AutomaticScalingEnabled
is, of course, enabled.