LostNoobo
(LostNoob)
December 4, 2021, 8:36am
#1
Hello, I Was Wondering How I Could Enable And Disable Particles From A Tool Located In Workspace
workspace.Player ( StarterPack), Here is The Script `local ha = 8165344945
local tool = script.Parent
repeat wait() until game.Players.LocalPlayer.Character
local LP = game.Players.LocalPlayer
local anim = Instance.new(“Animation”)
anim.AnimationId = “rbxassetid://”… ha
local PS = game.StarterPack.Sword.Handle.SmallerStar
local PS2 = game.StarterPack.Sword.Handle.LargerStar
PS.Enabled = false
PS2.Enabled = false
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
local backpack = player:WaitForChild(“Backpack”)
local cloneTool = game.ServerStorage.TestTool:Clone()
cloneTool.Parent = backpack
end)
end)
local dance = LP.Character.Humanoid:LoadAnimation(anim)
tool.Equipped:Connect(function()
dance:Play()
PS.Enabled = true
PS2.Enabled = true
wait(1)
local s = game.Players.LocalPlayer.Character:WaitForChild(“Sword”)
s.PS2.Enabled = false
s.PS.Enabled = false
end)
tool.Unequipped:Connect(function()
dance:stop()
end)
Just destroy the particle emitter.
LostNoobo
(LostNoob)
December 4, 2021, 8:38am
#3
didnt work sadly, now im dead inside
Your script is really unorganized. I can’t read it.
local dance = LP.Character.Humanoid:LoadAnimation(anim)
tool.Equipped:Connect(function()
local largeStar = game.Players.LocalPlayer.Character:WaitForChild(“Sword”).Handle.LargeStar:Clone()
local smallerStar = game.Players.LocalPlayer.Character:WaitForChild(“Sword”).Handle.SmallerStar:Clone()
dance:Play()
wait(2)
largeStar:Destroy()
smallerStar:Destroy()
end)
does this work?
LostNoobo
(LostNoob)
December 4, 2021, 8:48am
#7
thanks imma try it :DDDDDDDDDDDDDDDDDDDD
Scottifly
(Scottifly)
December 4, 2021, 8:49am
#8
When you copy a script to the forums you can either put three backticks (```) at the beginning of the script and at the end, or just highlight the script section and use the </> (Preformatted text) tool above the text box you type in to make the script more readable.
What do you mean by “a tool located in W”?
1 Like
I think my code might be incorrect.
1 Like
LostNoobo
(LostNoob)
December 4, 2021, 8:51am
#10
didnt work, i tried local script and normal script… the player is in workspace and it still doesnt work
Where is the particle located?
1 Like
LostNoobo
(LostNoob)
December 4, 2021, 8:52am
#12
inside the player,sword,handle
LostNoobo
(LostNoob)
December 4, 2021, 8:53am
#13
oki thanks, workspace thats what i meant
Try putting the particles in the replicated storage and
local dance = LP.Character.Humanoid:LoadAnimation(anim)
tool.Equipped:Connect(function()
local largeStar = game.ReplicatedStorage.LargeStar:Clone()
local smallerStar = game.ReplicatedStorage.SmallerStar:Clone()
largeStar.Parent = tool.Handle
smallerStar.Parent = tool.Handle
dance:Play()
wait(2)
largeStar:Destroy()
smallerStar:Destroy()
end)
LostNoobo
(LostNoob)
December 4, 2021, 8:54am
#15
alright i will try it, Thanks!
LostNoobo
(LostNoob)
December 4, 2021, 8:55am
#16
so i keep the particles in tthe sword or do i duplicate?
Put the particle in the replicated storage.
LostNoobo
(LostNoob)
December 4, 2021, 8:57am
#18
the particle’s isnt showing up in the sword tool after i putted them in replicatedstorage
did you put your sword variable in
largeStar.Parent = tool:WaitForChild("Handle")
smallerStar.Parent = tool:WaitForChild("Handle")
1 Like
Scottifly
(Scottifly)
December 4, 2021, 8:58am
#20
Are you looking in the sword tool in the ‘Players’ folder, or your ‘Character’ model in the workspace?
1 Like