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

Attempt to index number with value on size changing?

Asked by 2 years ago
Edited 2 years ago

I have a custom starter character and wanted it so if you touch an object, it changes sizes. I noticed there was no bodyscale properties in the regular Humanoid, so I added a humanoid description, but trying to change the scale shows an error. I've seen an error like this before, but can't get a good solution for it since I want the size to be a set size of 0.75. The code is here:

local debounce = false

script.Parent.Touched:Connect(function(hit)
    local humparent = hit.Parent:FindFirstChild("Humanoid")
    if humparent then
        local hum = humparent:FindFirstChild("HumanoidDescription")
        if hum then
            debounce = true
            hum.WidthScale.Value = 0.75
            hum.DepthScale.Value = 0.75
            hum.HeightScale.Value = 0.75
            wait(1)
            debounce = false
        end
    end
end)

0
whats the error Gmorcad12345 434 — 2y
0
Sorry, it's "Attempt to index number with Value" as said in the title. Dothemariobowp9 24 — 2y

Answer this question