currently struggling with trying to move the player character head a tiny bit up, I don’t code much so I always forget basic stuff.
body = 0.7 --change to how you want to scale the player's character
head = 1 --change to how you want to scale the player's head
local Players = game:GetService("Players")
local r6 = false
local r15 = false
local function onCharacterAdded(character)
local hum = character:FindFirstChild('Humanoid')
if hum.RigType == Enum.RigType.R15 then task.wait(3)
r15 = true
print(r15)
print('currently R15')
local humDesc = hum:WaitForChild("HumanoidDescription")
local HS = hum.HeadScale
local BDS = hum.BodyDepthScale
local BWS = hum.BodyWidthScale
local BHS = hum.BodyHeightScale
HS.Value = HS.Value * head
BDS.Value = BDS.Value * body
BWS.Value = BWS.Value * body
BHS.Value = BHS.Value * body
end
if r15 == false then task.wait(3)
print('currently R6')
local LastGrowth = 0
local AllowedAttachments = {
"FaceCenterAttachment",
"FaceFrontAttachment",
"HairAttachment",
"HatAttachment",
"NeckAttachment"
}
if time() - LastGrowth > 1 then
LastGrowth = time()
if character:FindFirstChild("AppliedGrowth") == nil then
local Motors = {}
local NewMotors = {}
local NewVal = Instance.new("BoolValue")
NewVal.Name = "AppliedGrowth"
NewVal.Parent = character
for i,v in pairs(character.Torso:GetChildren()) do
if v:IsA("Motor6D") then
table.insert(Motors, v)
end
end
table.insert(Motors, character.HumanoidRootPart.RootJoint)
local HatWelds = {}
for i,v in pairs(character:GetChildren()) do
if v:IsA("Accessory") then
if v:FindFirstChild("Handle") then
local Handle = v.Handle
if Handle:FindFirstChild("HatAttachment") or Handle:FindFirstChild("FaceFrontAttachment")
or Handle:FindFirstChild("HairAttachment")
then
Handle.AccessoryWeld.C0 = CFrame.new((Handle.AccessoryWeld.C0.p * head)) * (Handle.AccessoryWeld.C0 - Handle.AccessoryWeld.C0.p)
Handle.AccessoryWeld.C1 = CFrame.new((Handle.AccessoryWeld.C1.p * head)) * (Handle.AccessoryWeld.C1 - Handle.AccessoryWeld.C1.p)
table.insert(HatWelds, {Handle.AccessoryWeld:Clone(), Handle})
if Handle:FindFirstChild("Mesh") then
Handle.Mesh.Scale = Handle.Mesh.Scale * head
Handle.Mesh.Offset = Handle.Mesh.Offset * head
elseif Handle:FindFirstChild("SpecialMesh") then
Handle.SpecialMesh.Scale = Handle.SpecialMesh.Scale * head
Handle.SpecialMesh.Offset = Handle.SpecialMesh.Offset * head
end
elseif Handle:FindFirstChild("WaistFrontAttachment")
or Handle:FindFirstChild("WaistBackAttachment") or Handle:FindFirstChild("BodyBackAttachment")
or Handle:FindFirstChild("BodyFrontAttachment") or Handle:FindFirstChild("RightShoulderAttachment") or Handle:FindFirstChild("LeftShoulderAttachment") then
Handle.AccessoryWeld.C0 = CFrame.new((Handle.AccessoryWeld.C0.p * body)) * (Handle.AccessoryWeld.C0 - Handle.AccessoryWeld.C0.p)
Handle.AccessoryWeld.C1 = CFrame.new((Handle.AccessoryWeld.C1.p * body)) * (Handle.AccessoryWeld.C1 - Handle.AccessoryWeld.C1.p)
table.insert(HatWelds, {Handle.AccessoryWeld:Clone(), Handle})
if Handle:FindFirstChild("Mesh") then
Handle.Mesh.Scale = Handle.Mesh.Scale * body
Handle.Mesh.Offset = Handle.Mesh.Offset * body
elseif Handle:FindFirstChild("SpecialMesh") then
Handle.SpecialMesh.Scale = Handle.SpecialMesh.Scale * body
Handle.SpecialMesh.Offset = Handle.SpecialMesh.Offset * body
end
elseif Handle:FindFirstChild("NeckAttachment") then
Handle.AccessoryWeld.C0 = CFrame.new((Handle.AccessoryWeld.C0.p * body)) * (Handle.AccessoryWeld.C0 - Handle.AccessoryWeld.C0.p)
Handle.AccessoryWeld.C1 = CFrame.new((Handle.AccessoryWeld.C1.p * body)) * (Handle.AccessoryWeld.C1 - Handle.AccessoryWeld.C1.p)
table.insert(HatWelds, {Handle.AccessoryWeld:Clone(), Handle})
if Handle:FindFirstChild("Mesh") then
Handle.Mesh.Scale = Handle.Mesh.Scale * head
Handle.Mesh.Offset = Handle.Mesh.Offset * body
elseif Handle:FindFirstChild("SpecialMesh") then
Handle.SpecialMesh.Scale = Handle.SpecialMesh.Scale * head
Handle.SpecialMesh.Offset = Handle.SpecialMesh.Offset * body
end
end
end
end
end
for i,v in pairs(Motors) do
local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C0:components()
X = X * body
Y = Y * body
Z = Z * body
R00 = R00 * body
R01 = R01 * body
R02 = R02 * body
R10 = R10 * body
R11 = R11 * body
R12 = R12 * body
R20 = R20 * body
R21 = R21 * body
R22 = R22 * body
v.C0 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C1:components()
X = X * body
Y = Y * body
Z = Z * body
R00 = R00 * body
R01 = R01 * body
R02 = R02 * body
R10 = R10 * body
R11 = R11 * body
R12 = R12 * body
R20 = R20 * body
R21 = R21 * body
R22 = R22 * body
v.C1 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
table.insert(NewMotors, {v:Clone(), v.Parent})
v:Destroy()
end
for i,v in pairs(character:GetChildren()) do
if v:IsA("BasePart") then
if v.Name == "Head" then
v.Size = v.Size * head
--v.CFrame = character.Torso.CFrame * CFrame.new(0,1.2,0)
else
v.Size = v.Size * body
end
end
end
for i,v in pairs(NewMotors) do
v[1].Parent = v[2]
end
for i,v in pairs(HatWelds) do
--v[1].Part1 = character.Head
--v[1].Parent = v[2]
end
end
end
end
-- implement head height here
end
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)
thats the whole script, it makes the player small depending if its r15 or r6 , I need to higher the head of the model a tiny bit, any help?