#Anyone know how to tween a particle emitter's colour?

1 messages · Page 1 of 1 (latest)

brisk granite
#

im typing in something like this:

tService:Create(v, tInfo, {Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.new(1,0,0)),ColorSequenceKeypoint.new(1,Color3.new(1,0,0))})}):Play()

and aparently its not a tweenable property
any workarounds?

formal cedar
#

tween a proxy and apply the value to the color

brisk granite
#

proxy???

manic cryptBOT
#

studio** You are now Level 6! **studio

brisk granite
#

@formal cedar what is a proxy

grim flame
brisk granite
#

how

grim flame
#

Or put together the key points as instances and tween the values

grim flame
brisk granite
#

uhhh

grim flame
brisk granite
#

so the instance is particle.Color.Keypoints[1] and the property is Color

brisk granite
#
game:Getservice("TweenService"):Create(particle.Color.Keypoints[1], --[[assigned variable]] tInfo, {Color = Color3.new(1, 1, 0)}):Play()
#

smth like that?

grim flame
#

try

brisk granite
#

kk

#

Unable to cast value to Object - Server - Script:19

#

u know what i should do @grim flame?

grim flame
manic cryptBOT
#

studio** You are now Level 7! **studio

brisk granite
#
local tService = game:GetService("TweenService")
local tInfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
for _, v:UnionOperation|BasePart in pairs(script.Parent:GetChildren()) do
    if v:IsA("UnionOperation") or v.Name == "WaterPedestal" then
        task.spawn(function() while true do
                tService:Create(v, tInfo, {Color = Color3.fromRGB(255,0,0)}):Play()
                task.wait(10)
                tService:Create(v, tInfo, {Color = Color3.fromRGB(0,115,255)}):Play()
                task.wait(10)
                tService:Create(v, tInfo, {Color = Color3.fromRGB(255,255,0)}):Play()
                task.wait(10)
            end
        end)
    elseif v.Name == "Faucet" then
        local altrunrunabout = false
        if v:FindFirstChild("WaterEmitter") then v = v.WaterEmitter else altrunrunabout = true end
        if altrunrunabout == false then
            task.spawn(function() while true do
                    tService:Create(v.Color.Keypoints[1], tInfo, {Color = Color3.new(1, 0, 0)}):Play()
                    tService:Create(v.Color.Keypoints[2], tInfo, {Color = Color3.new(1, 0, 0)}):Play()
                    task.wait(10)
                    tService:Create(v.Color.Keypoints[1], tInfo, {Color = Color3.fromRGB(0,115,255)}):Play()
                    tService:Create(v.Color.Keypoints[2], tInfo, {Color = Color3.fromRGB(0,115,255)}):Play()
                    task.wait(10)
                    tService:Create(v.Color.Keypoints[1], tInfo, {Color = Color3.new(1, 1, 0)}):Play()
                    tService:Create(v.Color.Keypoints[2], tInfo, {Color = Color3.new(1, 1, 0)}):Play()
                    task.wait(10)    
                end
            end)
        end
    end
end
grim flame
#

Oh wait I'm an idiot

#

the tween parameters need an instance

#

the first parameter I mean

brisk granite
#

what

grim flame
#

I suggested a color value instance

brisk granite
#

yeah i didnt think that was an instance but i tried it anyway

grim flame
#

you can put it anywhere accessible

#

add it in explorer

#

all objects in the explorer are called instances btw

brisk granite
#

OH A COLOR VALUE

#

THATS

#

ok yeah thats my bad i didnt understand

#

lol

#

now i get it

formal cedar
#

yall figured it out

grim flame
brisk granite
#

no i dont get it

#
local tService = game:GetService("TweenService")
local tInfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In)
for _, v:UnionOperation|BasePart in pairs(script.Parent:GetChildren()) do
    if v:IsA("UnionOperation") or v.Name == "WaterPedestal" then
        task.spawn(function() while true do
                tService:Create(v, tInfo, {Color = Color3.fromRGB(255,0,0)}):Play()
                task.wait(10)
                tService:Create(v, tInfo, {Color = Color3.fromRGB(0,115,255)}):Play()
                task.wait(10)
                tService:Create(v, tInfo, {Color = Color3.fromRGB(255,255,0)}):Play()
                task.wait(10)
            end
        end)
    elseif v.Name == "Faucet" then
        local altrunrunabout = false
        local colorKey
        if v:FindFirstChild("WaterEmitter") then colorKey = v.Value v = v.WaterEmitter else altrunrunabout = true end
        if altrunrunabout == false then
            task.spawn(function() while true do
                    tService:Create(colorKey, tInfo, {Value = Color3.fromRGB(255, 0, 0)}):Play()
                    task.wait(10)
                    tService:Create(colorKey, tInfo, {Value = Color3.fromRGB(0,115,255)}):Play()
                    task.wait(10)
                    tService:Create(colorKey, tInfo, {Value = Color3.fromRGB(255, 255, 0)}):Play()
                    task.wait(10)    
                end
            end)
            task.spawn(function() while task.wait() do
                    v.Color.Keypoints[1] = ColorSequenceKeypoint.new(0, colorKey.Value)
                    v.Color.Keypoints[2] = ColorSequenceKeypoint.new(1, colorKey.Value)
                end
            end)
        end
    end
end
#

no error, and the value is changing

#

just the color of the particle isnt

#

@formal cedar @grim flame help pls

formal cedar
#

ngl

#

im too tired to figure this out

#

@grim flame

#

got this

#

lemme give this to ai for a sek

grim flame
#

I'm off my phone for the next 30 mins

formal cedar
#

thats my answer

brisk granite
#

i mean not exactly

#

its theres curly brackets betweenthe normal brackets in colorsequence.new()

#

but that works

#

ty

formal cedar
#

does ts work

brisk granite
#

yes

formal cedar
#

cool

manic cryptBOT
#

studio** You are now Level 30! **studio