New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How do i turn this into a working aura? cuz i inserted into my aura script it didn't run.

Asked by 4 years ago
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character) 

local Torso = character:WaitForChild("Torso")
b = Instance.new("ParticleEmitter") 
b.Size = NumberSequence.new(2.5)
b.Parent = Torso 
b.LightEmission = 0.7
b.Rate = 50
b.Lifetime = NumberRange.new(0.5)
b.Texture = "http://www.roblox.com/asset/?id=255513949" 

end) 
    end)`

--------------this whole thing is the particle emitter that surrounds the torso, so how do i turn this into local script that can be used in tools?

1 answer

Log in to vote
0
Answered by 4 years ago

Hierarchy:

  • StarterPack
    • Tool
      • Handle
      • LocalScript
local tool = script.Parent
local p = game.Players.LocalPlayer
local torso = p.Character:WaitForChild("Torso")
local particleName = "ToolParticles"

tool.Equipped:connect(function()
    if torso:FindFirstChild(particleName) then
            local b = Instance.new("ParticleEmitter",torso)
            b.Name = particleName
            b.Size = NumberSequence.new(2,5)
            b.LightEmission = 0.7
            b.Rate = 50
            b.Lifetime = NumberRange.new(1,5)
            b.Texture = "http://www.roblox.com/asset/?id=255513949"
    end
end)

tool.Unequipped:connect(function()
    local particles = torso:FindFirstChild(particleName)
    if  particles then
        particles:Destroy()
    end
end)

If you need it to be explained, comment.

0
I want to insert it into hopper bin without using part/handle SHIFTRK9 -2 — 4y
0
How would that work? Explain more in depth please :) TheDeadlyPanther 2438 — 4y
0
Well i need to show you, i need you to follow me on my game. SHIFTRK9 -2 — 4y
Ad

Answer this question