the script below should unanchor all parts of the parent parent group. so script.parent.parent, while also emitting some effects for destruction effects. though it used to work, now it literally unanchors the whole game making it lag immensely. instead of just unanchoring one group model
local ready = true
local sound = script.Parent.Sound--Change to your sound location.
local delaytime = 5
script.Parent.Touched:Connect(function()
if ready == true then
ready = false
for i, v in pairs(script.Parent.Parent:GetChildren()) do
if not v:IsA("BasePart") then continue end
v.Anchored = false
local smoke = Instance.new("Smoke")
smoke.Parent = v
smoke.Color = Color3.new(197, 196, 199)
smoke.Opacity = 0.25
smoke.RiseVelocity = 6
end
sound:Stop()
sound:Play()
wait(delaytime) -- Amount of till making smoke dissapear
for i, v in pairs(script.Parent.Parent:GetChildren()) do
if v:IsA("BasePart") then
v.Smoke:Destroy()
end
end
script:Destroy()
ready = true
end
end)
for _, v in pairs(script.Parent.Parent:GetChildren()) do
v.Anchored = false
local smoke = Instance.new("Smoke")
smoke.Parent = v
smoke.Color = Color3.new(197, 196, 199)
smoke.Opacity = 0.25
smoke.RiseVelocity = 6
end
I don’t think that is necessary tbh
Or if you wanna avoid basepart here is the code!
for _, v in pairs(script.Parent.Parent:GetChildren()) do
if not v:IsA("BasePart") then
v.Anchored = false
local smoke = Instance.new("Smoke")
smoke.Parent = v
smoke.Color = Color3.new(197, 196, 199)
smoke.Opacity = 0.25
smoke.RiseVelocity = 6
end
end
Mark My post as a solution as it works! If you need more help dm me in discord! CallMeEvil#0001
for i, v in pairs(script.Parent.Parent:GetChildren()) do
if not v:IsA("BasePart") then continue end
v.Anchored = false -- here
local smoke = Instance.new("Smoke")
smoke.Parent = v
smoke.Color = Color3.new(197, 196, 199)
smoke.Opacity = 0.25
smoke.RiseVelocity = 6
end
on the line v.Anchored = false add print(v) directly before or after