I tried, and my accessories didnt grow either, heres what i have so far
local tool = script.Parent
local PhysicsService = game:GetService("PhysicsService")
local function setupCollisionGroup(character)
PhysicsService:RegisterCollisionGroup("ScaledCharacter")
PhysicsService:CollisionGroupSetCollidable("ScaledCharacter", "Default", false)
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
PhysicsService:SetPartCollisionGroup(part, "ScaledCharacter")
end
end
end
tool.Equipped:Connect(function()
local character = tool.Parent
if character then
setupCollisionGroup(character)
end
end)
tool.Activated:Connect(function()
local character = tool.Parent
local player = game.Players:GetPlayerFromCharacter(character)
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://81090340118418"
local animTrack = humanoid:LoadAnimation(animation)
animTrack:Play()
local sizeIncrease = tool:GetAttribute("SizeIncrease") or 0.1
local healthIncrease = tool:GetAttribute("HealthIncrease") or 10
humanoid.MaxHealth = humanoid.MaxHealth + healthIncrease
humanoid.Health = humanoid.Health + healthIncrease
local currentScale = character:GetScale()
local scaleFactor = 1 + sizeIncrease / currentScale
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
part.Size = part.Size * scaleFactor
PhysicsService:SetPartCollisionGroup(part, "ScaledCharacter")
end
end
-- Scale accessories and update their attachments
for _, accessory in pairs(character:GetChildren()) do
if accessory:IsA("Accessory") then
local handle = accessory:FindFirstChild("Handle")
if handle and handle:IsA("BasePart") then
handle.Size = handle.Size * scaleFactor
for _, attachment in pairs(handle:GetChildren()) do
if attachment:IsA("Attachment") then
attachment.Position = attachment.Position * scaleFactor
end
end
PhysicsService:SetPartCollisionGroup(handle, "ScaledCharacter")
end
end
end
local burgerHandle = tool:FindFirstChild("Handle")
if burgerHandle and burgerHandle:IsA("BasePart") then
burgerHandle.Size = burgerHandle.Size * scaleFactor
PhysicsService:SetPartCollisionGroup(burgerHandle, "ScaledCharacter")
end
if humanoid.RigType == Enum.HumanoidRigType.R15 then
local humanoidDescription = humanoid:GetHumanoidDescription()
humanoidDescription.BodyTypeScale = humanoidDescription.BodyTypeScale + sizeIncrease
humanoid:ApplyDescription(humanoidDescription)
end
end
end)