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

Why is the color sequence not working? The particle emitter color?

Asked by 4 years ago
local d = true

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        if (d) == true then
            d = false
            local hum = hit.Parent.Humanoid
            hum.Health = hum.Health-20
            script.Parent.BrickColor = BrickColor.new("Medium stone grey")
            script.Parent:WaitForChild("ParticleEmitter").Color = ColorSequence.new{Color3.fromRGB(162,163,165)}
            script.Parent.Material = Enum.Material.Plastic
            wait(3)
            script.Parent.BrickColor = BrickColor.new("Persimmon")
            script.Parent:WaitForChild("ParticleEmitter").Color = ColorSequence.new(Color3.fromRGB(255,89,89))
            script.Parent.Material = Enum.Material.Neon
            d = true
        end
    end
end)

Answer this question