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 5 years ago
01local d = true
02 
03script.Parent.Touched:Connect(function(hit)
04    if hit.Parent:FindFirstChild("Humanoid") then
05        if (d) == true then
06            d = false
07            local hum = hit.Parent.Humanoid
08            hum.Health = hum.Health-20
09            script.Parent.BrickColor = BrickColor.new("Medium stone grey")
10            script.Parent:WaitForChild("ParticleEmitter").Color = ColorSequence.new{Color3.fromRGB(162,163,165)}
11            script.Parent.Material = Enum.Material.Plastic
12            wait(3)
13            script.Parent.BrickColor = BrickColor.new("Persimmon")
14            script.Parent:WaitForChild("ParticleEmitter").Color = ColorSequence.new(Color3.fromRGB(255,89,89))
15            script.Parent.Material = Enum.Material.Neon
16            d = true
17        end
18    end
19end)

Answer this question