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 3 years ago
Edited 3 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:

01local debounce = false
02 
03script.Parent.Touched:Connect(function(hit)
04    local humparent = hit.Parent:FindFirstChild("Humanoid")
05    if humparent then
06        local hum = humparent:FindFirstChild("HumanoidDescription")
07        if hum then
08            debounce = true
09            hum.WidthScale.Value = 0.75
10            hum.DepthScale.Value = 0.75
11            hum.HeightScale.Value = 0.75
12            wait(1)
13            debounce = false
14        end
15    end
16end)
0
whats the error Gmorcad12345 434 — 3y
0
Sorry, it's "Attempt to index number with Value" as said in the title. Dothemariobowp9 24 — 3y

Answer this question