I want to be able to increase the size of a player to 2 real life meters
3 Likes
local function makeBigger(humanoid, meters)
local makeBigger = {
humanoid.BodyDepthScale;
humanoid.BodyHeightScale;
humanoid.BodyTypeScale;
humanoid.BodyWidthScale;
humanoid.HeadScale;
}
for i,v in ipairs(makeBigger) do
v.Value = meters
end
end
2 Likes
its not working?
local function makeBigger(humanoid, meters)
local makeBigger = {
humanoid.BodyDepthScale;
humanoid.BodyHeightScale;
humanoid.BodyTypeScale;
humanoid.BodyWidthScale;
humanoid.HeadScale;
}
for i,v in ipairs(makeBigger) do
v.Value = meters
end
end
local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
if Humanoid then
makeBigger(game.Players.LocalPlayer.Character.Humanoid, 20)
end
1 Like
You have to do this in a ServerScript, or only the local player will see it.
1 Like
not working either?
local function makeBigger(humanoid, meters)
local makeBigger = {
humanoid.BodyDepthScale;
humanoid.BodyHeightScale;
humanoid.BodyTypeScale;
humanoid.BodyWidthScale;
humanoid.HeadScale;
}
for i,v in ipairs(makeBigger) do
v.Value = meters
end
end
game.Players.PlayerAdded:Connect(function(PlayerAdded)
local Humanoid = PlayerAdded.Character:WaitForChild("Humanoid")
if Humanoid then
makeBigger(Humanoid, 20)
end
end)
local function makeBigger(humanoid, meters)
local makeBigger = {
humanoid.BodyDepthScale;
humanoid.BodyHeightScale;
humanoid.BodyTypeScale;
humanoid.BodyWidthScale;
humanoid.HeadScale;
}
for i,v in ipairs(makeBigger) do
v.Value = meters
end
end
game:GetService("Players").PlayerAdded:Connect(function(plr)
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = char.Humanoid
makeBigger(humanoid, 5)
end)
Should work. Put this in a ServerScript.
2 Likes
I don’t know how many studs are two real life meters, but if you know that, maybe you can use this to resize the character. multiplier
is targetsize/currentsize.
Edit: According to this post, one stud is 0,28 meters which means that 2 meters is 2/0,28 studs. If the character you are resizing is default size (5 studs), then multiplier should probably be 2/0,28/5
.
local function makeBigger(char, multiplier)
for i, v in ipairs(char:GetDescendants()) do
if v:IsA("BasePart") then
v.Size *= multiplier
elseif v:IsA("Attachment") then
v.Position *= multiplier
elseif v:IsA("Motor6D") or v:IsA("Weld") then
local c0, c1 = v.C0, v.C1
local c0Pos, c1Pos = c0.Position, c1.Position
v.C0 = c0-c0Pos+c0Pos*multiplier
v.C1 = c1-c1Pos+c1Pos*multiplier
end
end
end
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.