Change :resize to use Model :ScaleTo() method
Changes the "resize" command under "Fun" to use the new modern Roblox method Model:ScaleTo to change player size, allowing for animations to be naturally corrected to size.
Video of me testing the method provided https://github.com/user-attachments/assets/64063c26-9729-43a9-b8ed-e8724ea81cab
This is the module script used for the test of functionality for this pull request;
return function (char : Model & {Humanoid : Humanoid}, size : number)
local num = math.clamp(size,0.01,100)
local human = char:FindFirstChild("Humanoid")
char:ScaleTo(num)
if not human:GetAttribute("Adonis_OriginalHipHeight") then
human:SetAttribute("Adonis_OriginalHipHeight", human.HipHeight)
end
human.HipHeight = human:GetAttribute("Adonis_OriginalHipHeight") * num
end
use require(script)(game.Players.<Player>.Character,n) to test this yourself.
Does this work with both R6 and R15? Also does this set the humanoid scale values for R15 and if not could it cause some potential issues?
This works for both R6 and R15. The primary method I'm using is player character's model's scale property, not the humanoid instance. This is a property that that makes the model bigger, and from what I have tested, it works as expected. eg: mass is updated accordingly.
Also from further testing I discovered that I do not need to change the hip height.
Fixed