Hello!
I have a R15 NPC player with their humanoid named "chef"
My script works great on players in the game, But I want the chef to also increase in size when a particular brick is touched by a player:
function onTouched(hit)
local chef = hit.Parent:FindFirstChild("Humanoid")
if chef then
local BDS = chef:FindFirstChild('BodyDepthScale')
local BWS = chef:FindFirstChild('BodyWidthScale')
if BDS and BWS then
BDS.Value = BDS.Value + .10
BWS.Value = BWS.Value + .10
end
end
end
script.Parent.Touched:Connect(onTouched)
I have tried renaming the humanoid but it doesn't seem to be working.
I have also pasted BodyDepthScale & BodyWidthScale into the NPC's humanoid and it works if I manually adjust the values, but the onTouch doesn't communicate with them.
Any suggestions?

1 comment
So just to add more information. I want the NPC Chef to get larger each time the player touches a specific part. Any help would be appreciated!