I’ve got a basic script that registers when a player collides with it’s parent (a part) and multiplies all the players humanoid scales by 2, I know the script it managing to register the collision and collect the players humanoid but I get the error “attempt to perform arithmetic (mul) on Instance and number” for the line where it begins multiplying the values, could someone point out how I can fix this?
local part = script.Parent
local RESET_SECONDS = 1
local istouched = false
local function onPartTouched(otherPart)
local partParent = otherPart.Parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
local Depth = humanoid:FindFirstChild("BodyDepthScale")
local Height = humanoid:FindFirstChild("BodyHeightScale")
local Proportion = humanoid:FindFirstChild("BodyProportionScale")
local Type = humanoid:FindFirstChild("BodyTypeScale")
local Width = humanoid:FindFirstChild("BodyWidthScale")
local Head = humanoid:FindFirstChild("HeadScale")
if not istouched then
istouched = true
Depth = Depth*(2)
Height = Height*(2)
Proportion = Proportion*(2)
Type = Type*(2)
Width = Width*(2)
Head = Head*(2)
wait(RESET_SECONDS)
istouched = false
end
end
end
part.Touched:Connect(onPartTouched)