Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What does, "DataModel was not available" mean when using Humanoid:ApplyDescription?

Asked by 4 years ago
Edited 4 years ago

Hi, so I'm trying to make something that allows a player to have a R6 hitbox while still having an R15 character. To do this: I forced R6, inserted a R16 dummy into ServerStorage and put this script into StarterCharacterScripts (this script isn't complete yet).

wait(1)
local char = script.Parent
local plr = game:GetService("Players"):GetPlayerFromCharacter(char)
local uid = plr.UserId
local charinfo = game:GetService("Players"):GetCharacterAppearanceInfoAsync(uid)
local avatartype = charinfo.playerAvatarType


if avatartype == "R15" then
    local humdesc = game:GetService("Players"):GetHumanoidDescriptionFromUserId(uid)
    humdesc.Parent = game:GetService("ReplicatedStorage").Temp
    -- Makes the character invisible
    plr:ClearCharacterAppearance()
    for i,v in pairs(char:GetChildren()) do
        if v:IsA("Part") then
            -- Removes meshes that are possibly problematic for the next step
            for i2,v2 in pairs(v:GetChildren()) do
                if v2:IsA("BlockMesh") or v2:IsA("SpecialMesh") then
                    v2:Destroy()
                end
            end
            -- Makes invisible
            Instance.new("SpecialMesh", v).Scale = Vector3.new(0,0,0)
            -- Hide name
            char.Head.Transparency = 1
        end
    end
    local fchar = game:GetService("ServerStorage").R15:Clone()
    fchar:MakeJoints()
    fchar.Humanoid:ApplyDescription(humdesc) --the error points to here
    fchar.Parent = workspace
end

when I run this, I get the error "DataModel was not available" that points to the line indicated above. I've seen another person with a similar error here, but there are no answers or comments that have helped me.

Thank you so much

also if you need to see the place that I'm doing it in, it's here

1 answer

Log in to vote
1
Answered by 4 years ago

Perhaps the cloned humanoid needs to be within the DataModel?

It should be called from Server-Side.

0
Yeah, the problem was that the cloned character wasn't parented. ThisIsAnAccount255 143 — 4y
0
Thanks ThisIsAnAccount255 143 — 4y
Ad

Answer this question