Is this at the top of the script? Maybe try using WaitForChild.
Infinite yield
Edit: I’m pretty sure this is because the body scalers aren’t automatically inside of the model. They’re added in when the humanoid appearance is set.
Oh I’m sorry!
A big mistake of mine xd
Put “not” before FindFirstChild.
PS: fix the script.
There’s nothing in the output now, but nothing happens…
These kind of things are normally the simplest mistakes.
What if you just added a wait(2) at the top of the script to give it time to load in?
Nah nothing happens, just the same thing.
I also already have a RunService.Heartbeat:Wait()
which should do the trick as I’ve used it on an unloaded character model before.
Hmmm, and it is the only model named “Dummy” in the entire workspace?
Yessir
Not enough characters
dhdashfahfadjfadfdasifhdasjfhdas
Could you add a print like this so that we can see what it thinks are the children.
print(humanoid:GetChildren())
It says… ...
in the output.
That is very weird. And have you tried just doing the simple thing of saying this:
humanoid.BodyDepthScale = 1 --or whatever you want
I’m confused. Am I supposed to set the value to …?
Modify the script a bit and add my own, animation doesn’t work, but scaling does.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local userid = 2064158565
local dummy = workspace:WaitForChild("Dummy")
local humanoid = dummy:WaitForChild("Humanoid")
function CreateOfflineCharacter(UserID, Dummy)
local Appearance = Players:GetHumanoidDescriptionFromUserId(UserID)
humanoid:ApplyDescription(Appearance)
--| Scale |--
local Find = {
["BodyDepthScale"] = 0.5,
["BodyHeightScale"] = 0.5,
["BodyProportionScale"] = 0.5,
["BodyWidthScale"] = 0.5,
["HeadScale"] = 0.5
}
for Name,Val in pairs(Find) do
if not humanoid:FindFirstChild(Name) then
local Value = Instance.new("NumberValue",humanoid)
Value.Name = Name
Value.Value = Val
else humanoid[Name].Value = Val end
end
-------------
-- local name = Players:GetNameFromUserIdAsync(userid)
humanoid.NameDisplayDistance = 0
end
--The new animation
local ani = Instance.new("Animation", dummy)
ani.Name = "IdleAni"
ani.AnimationId = "http://www.roblox.com/asset/?id=507766388"
local animationtrack = humanoid:LoadAnimation(ani)
if humanoid then
--Manipulate body size
RunService.Heartbeat:Wait()
animationtrack:Play()
animationtrack.Looped = true
end
--CreateOfflineCharacter function
local success = pcall(function()
CreateOfflineCharacter(userid, dummy)
end)
if success then print("Succeeded!")
else warn("Failed!") end
Where are you putting it?
PS: how do you do this?
No set it to a number value. Sorry I just put that there meaning you could put your number there. Basically, I was wondering if the BodyDepthScale wouldn’t come out as being a child, but maybe just saying Humanoid.BodyDepthScale could work.
Nah nothing happened there. (30)
Nothing changed. I think this might purely be a loading problem.
No one seems to have pointed it out, you know that HumanoidDescriptions have several scale properties you can change?
You can probably just skip all the value checking. Just change the values you want in the HumanoidDescription before you use ApplyDescription()
.
local function CreateOfflineCharacter(UserID, Dummy)
local Appearance = game.Players:GetHumanoidDescriptionFromUserId(UserID)
Appearance.HeightScale = 3 -- Example
Dummy.Humanoid:ApplyDescription(Appearance)
local name = game.Players:GetNameFromUserIdAsync(userid)
Dummy.NameDisplayDistance = 0
end
Special thanks to: @XdJackyboiiXd21 @SOTR654 for putting so much effort to help me out!
And thanks to @Vulkarin for finding the answer for us!