Hello! I am trying to make an item that increases the players Body Depth & Body Width onTouch. However; the below script is not working.. Please help!

function onTouched(hit)

	local Character = hit.Parent:FindFirstChild("Humanoid")
	 local Humanoid = Character:FindFirstChild('Humanoid')
	
	if Humanoid then
		local BDS = Humanoid:FindFirstChild('BodyDepthScale')
		local BWS = Humanoid: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)



1 comment

0

The issue is line 4. You're trying to find a Humanoid inside of another Humanoid.