Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make blocks w/ particle mitters appear and disappear? [closed]

Asked by 6 years ago
Edited 6 years ago

Previously, I made a key based off the celestial spirit keys from Fairy Tail and I was able to script the model into being holdable.The thing I need help with is having blocks with particle emitters appear infront of it when the user clicks while holding the key then it disappears after a few seconds. I technically was able to do this on a smaller scale by using this script. function weld() local parts,last = {} local function scan(parent) for _,v in pairs(parent:GetChildren()) do if (v:IsA("BasePart")) then if (last) then local w = Instance.new("Weld") w.Name = ("%s_Weld"):format(v.Name) w.Part0,w.Part1 = last,v w.C0 = last.CFrame:inverse() w.C1 = v.CFrame:inverse() w.Parent = last end last = v table.insert(parts,v) end scan(v) end end scan(script.Parent) for _,v in pairs(parts) do v.Anchored = false end end

weld() script:Remove()

I also used a local script which was function weld() local parts,last = {} local function scan(parent) for _,v in pairs(parent:GetChildren()) do if (v:IsA("BasePart")) then if (last) then local w = Instance.new("Weld") w.Name = ("%s_Weld"):format(v.Name) w.Part0,w.Part1 = last,v w.C0 = last.CFrame:inverse() w.C1 = v.CFrame:inverse() w.Parent = last end last = v table.insert(parts,v) end scan(v) end end scan(script.Parent) for _,v in pairs(parts) do v.Anchored = false end end

weld() script:Remove() These scripts only enabled me to emit particles from the key for a short time but I want to make a more complex design by making blocks reappear with particle emitters and disappear but I only found out how to make blocks disappear when you click them. /:/

Closed as Not Constructive by SchonATL and shayner32

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?