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

Why does the trail's color doesnt change?

I try to code that whenever i got a certain leaderstats value, the trail color will changing, but it doesnt

if k.Value == "Anak TK" or f.Value > 0 or f.Value < 20 then wait(1)
	    local cloneguis = TrailPemula:Clone()
		        local attachment0 = Instance.new("Attachment",character.Head)
				attachment0.Name = "TrailAttachment0"
				local attachment1 = Instance.new("Attachment",character.HumanoidRootPart)
				attachment1.Name = "TrailAttachment1"
				cloneguis.Attachment0 = attachment0
				cloneguis.Attachment1 = attachment1
				cloneguis.Color = Color3.fromRGB(204, 142, 105) -- this is actually line 70
			end
		

and i got this error

23:19:22.336 - ServerScriptService.Trail:70: invalid argument #3 (ColorSequence expected, got Color3)
23:19:22.338 - Stack Begin
23:19:22.339 - Script 'ServerScriptService.Trail', Line 70

what should i do?

1 answer

✓ Accepted answer

Trails expect a colorsequence in their color property. To fix this simply do

trail.Color = ColorSequence.new(Color3.fromRGB())

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