DevLazl
(Lazl)
December 27, 2021, 4:47am
#1
What do you want to achieve? I want to make a player get a trail with a touched event that has a color sequence
What is the issue? I have the trail but I can not get the sequence
What solutions have you tried so far? I have tried using vector3, to no result.
script.Parent.Touched:Connect(function(plr)
local trail = Instance.new("Trail")
trail.Parent = plr.Parent.UpperTorso
local attachOne = Instance.new("Attachment")
attachOne.Name = "A1"
attachOne.Parent = plr.Parent.UpperTorso
local attachTwo = Instance.new("Attachment")
attachTwo.Name = "A2"
attachTwo.Parent = plr.Parent.UpperTorso
trail.Attachment0 = attachOne
trail.Attachment1 = attachTwo
attachOne.Position = Vector3.new(-1.5, .5, 1)
attachTwo.Position = Vector3.new(1, 1, 1)
trail.FaceCamera = true
trail.LightEmission = 0
trail.LightInfluence = 1
trail.Lifetime = 1
trail.MaxLength = 10
end)
Help would be apreciated!
1 Like
Kaid3n22
(Kaiden)
December 27, 2021, 5:31am
#2
Use colorsequence to make a trail with a color sequence. EX:
--rainbow
local trail = Instance.new("Trail")
trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)), ColorSequenceKeypoint.new(0.145, Color3.fromRGB(255, 127, 0)), ColorSequenceKeypoint.new(0.311, Color3.fromRGB(255, 255, 0)), ColorSequenceKeypoint.new(0.434, Color3.fromRGB(0, 255, 0)), ColorSequenceKeypoint.new(0.582, Color3.fromRGB(0, 255, 255)), ColorSequenceKeypoint.new(0.719, Color3.fromRGB(0, 0, 255)), ColorSequenceKeypoint.new(0.862, Color3.fromRGB(75, 0, 130)), ColorSequenceKeypoint.new(1, Color3.fromRGB(143, 0, 255))})
1 Like
Scottifly
(Scottifly)
December 27, 2021, 9:28am
#4
You should mark @Kaid3n22 ’s post as the Solution so others don’t try to solve it as well. If someone is searching for the same answer then posting this as Solved will help them too.
DevLazl
(Lazl)
December 27, 2021, 12:20pm
#5
how do you mark as a solution?
That was lagit my 1st post sorry
1 Like
Change the category to scripting support as it will get flagged. You can’t mark the solution because of the category. Once you change it, it will show a check mark and you mark it from the reply.
DevLazl
(Lazl)
December 27, 2021, 2:09pm
#7
alright I just moved it thanks
1 Like
I am always gonna be here to help!
1 Like