Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to change the colour of a trail?

How can I change the colour of a trail within a script?

2 answers

Don’t know much about trails, but I did find the website for it. https://developer.roblox.com/en-us/api-reference/property/Trail/Color Example Code:

local trail = — trail location
trail.Color = ColorSequence.new(Color3.new(255,0,0)) — red
wait(2)
trail.Color = ColorSequence.new(Color3.new(0,255,0)) — green

If you need more help don’t hesitate to contact me!

2 comments

0

"ColorSequence expected"

0

Edited, please tell me if any other errors.

Trails work with ColorSequences, which can be constructed with various Color3 arguments. For example, this would make a sequence of a blue that turns red after.

local Trail -- = your trail variable

Trail.Color = ColorSequence.new(Color3.fromRGB(0,0,255),Color3.fromRGB(255,0,0))

I would recommend using .fromRGB instead of new so you can convert colors easier, but that's up to you!

EDIT: I had to edit the script since the first answer would error, I hadn't tested it and only saw this now. Sorry!

3 comments

0

What if I just want 1 colour?

0

Pretty sure you could just use one argument and it should work fine! like this: Trail.ColorSequence.new(Color3.fromRGB(0,0,255)), which should make it blue!

0

Did it work?

This discussion is preserved as it was. New answers, comments, and votes are closed.