I am relatively new to scripting, currently I have been working on modifying an R6 resize script (I only use R6 for my morphs and things like that, even tho R15 is better for resizing, i’d rather not use it). Everything was working fine, until I got to resizing the 3D(Parts, Meshparts,etc) Inside the script. I got this line of code
for context, the percent variable is equal “2”.
rather than morphing into this
I morphed into this
how exactly would I fix this?
from what appears to me, the positions stayed the same, thats why I tried the line of code above, it didnt work tho
Maybe try getting the vector position relative to the HumanoidRootPart, and then multiply that by 2, and use the HumanoidRootPart to offset its position for the new position of the parts. This would make sure certain parts aren’t shifted relative to the origin, but rather in relation to the root.
for _, Part in pairs(player.Character:GetDescendants()) do
if Part.Name == "Hulkbuster(Model87)" then
local Offset = Part.Position - player.Character.HumanoidRootPart.Position
Part.Position = player.Character.HumanoidRootPart.Position + Offset * Percent
end
end
I mean, it was, but it really doesnt fix my issue…Sorry if I made it seem a bit mean or out of maners, I spent yesterday night and morning today attempting on fixing it
What I sent should have fixed it, although I would have used CFrame if I coded it on my own. If I had to take a guess, you built it improperly or there are other things in the script messing things up.
But good luck with your problem! Sorry it wouldn’t be fixed.
You know, with the addition of attributes, you could easily go in and add a Vector3 value that hold the object’s relative position to the center of the parent object, and then in a script, run through and set those values once at the beginning of the game, and then call them later when you need to scale.
Edit: You could’ve done this with Vector3Values too, but it’s not as organized in my opinion.
I dont think the problem is the specific center point for scaling youre choosing
Does your object contain any accessories?
It seems like its working for some parts but not for others