i have this script which attaches parts onto the humanoid body upon touched. my game works with size changing so its kinda annoying all the parts stay the same size when size changing. i thought this couldve been solved by making the part going onto the player the same size as the part it is attached to so that if i grow/ shrink the part also grows/ shrink. i dont know
locations: Locations: part to touch is in workspace, inside that part is this script. and then in server storage theres a sphere called Sph
local Players = game:GetService("Players")
local TPDest = workspace.TouchPart
local cooldown = false
local cooldowntimer = 15 -- Change this to whatever you want the cooldown to be
local particletimer=2.1
local refreshtimer=1.5
local Particles= workspace.BallParticle.ParticleEmitter--path for your particles here
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
script.Parent.Touched:Connect(function(partTouched)
if partTouched.Parent:FindFirstChild("Humanoid") and not cooldown then
cooldown = true
local Character = partTouched.Parent
local Player = Players:GetPlayerFromCharacter(Character)
Particles.Enabled=true
delay(particletimer,function() Particles.Enabled=false end)
delay(refreshtimer,function()
Player:LoadCharacter()
Player.Character:WaitForChild("HumanoidRootPart").CFrame = TPDest.CFrame
local char = plr.Character or plr.CharacterAdded:Wait()
wait()
for i, v in pairs(char:GetDescendants()) do
if v:IsA("MeshPart") or v:IsA("Part") then
local new = game.ServerStorage.Sph:Clone()
if v.name == "HumanoidRootPart" then
new:Destroy()
else
new.BrickColor = BrickColor.Random(math.randomseed)
local weld = Instance.new("Weld", new)
weld.Part0 = v
weld.Part1 = new
new.Parent = v
v.Transparency = 1
end
end
if Player.Character:FindFirstChild("ForceField") then Player.Character:FindFirstChild("ForceField"):Destroy() end
end
end)
wait(cooldowntimer)
cooldown = false
end
end)