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

How to detect a Imagelabel color to to copy over to a particle emitter's colorsequence?

Asked by 9 years ago

I'm currently reverse engineering a script Clonetrooper1019 made when you stand over a Point Light it shows the hue on the ImageColor3, What I basically want to know is I want to make the particleemitter's color change to whatever color the imagecolor3 is currently at. Like if the ImageLabel is red then orange or green it syncs with the ParticleEmitter's Color. I'm very confused because ColorSequence is a bit confusing for me after all custom particles are fairly new. I would like advice on how I would be able to do this .

0
I don't believe that is Possible. woodengop 1134 — 9y
0
Actually, it is. I had to look into the Wiki, but I figured it out. More complicated than I expected, lol. Answer below :P dyler3 1510 — 9y
0
cool woodengop 1134 — 9y

2 answers

Log in to vote
1
Answered by
dyler3 1510 Moderation Voter
9 years ago

Try something like this (Assuming this script is inside the ImageLabel) :

PEmitter=game.Workspace.Part.ParticleEmitter --Gets the particle emitter. Change this to find where it actually is.
Color1=Color3.new(255,255,255) --Set as the base color (Set's first color)

function ColorChange() --Defines a function to fire later
    local Color2=script.Parent.ImageColor3 --Sets second color
    PEmitter.Color=ColorSequence.new(Color1,Color2) --Sets the color
end

ColorChange() --Fires function once

script.Parent.Changed:connect(function()
    ColorChange() --Fires function every time the color is changed in ImageLabel.
end)

This should work if you use it correctly. Anyways, if you have any further questions or problems, let me know in the comments. Hope I helped :P

0
Have you tested this? woodengop 1134 — 9y
0
Yea...why'd you downvote? dyler3 1510 — 9y
0
my bad i don't know how to use that feature i thought it was an upvote Telemoderator 5 — 9y
0
Oh, lol ok. So did this work for you then? dyler3 1510 — 9y
0
Actually, I downvoted by accident mb sorry. woodengop 1134 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

works thanks much appreciated

1
Please use the Comments. woodengop 1134 — 9y

Answer this question