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

[Solved]My trail color changer not working?

Asked by 6 years ago
Edited 6 years ago

So I have a trail color changer, which fires and recieves correctly, but it doesn’t change the color correctly. The color always changes to black. Here is the local script:

1script.Parent.MouseButton1Click:Connect(function()
2 
3    game.ReplicatedStorage.ChangeTrailColor:FireServer(script.Parent.Parent.ColorDisplay.BackgroundColor3)
4     
5    script.Parent.Parent.Visible = false
6     
7    print(script.Parent.Parent.ColorDisplay.BackgroundColor3)
8     
9    end)

Here is server side script:

01game.ReplicatedStorage.ChangeTrailColor.OnServerEvent:Connect(function(plr, color)
02 
03   
04 
05if not plr.Character then
06 
07plr.CharacterAdded:wait();
08 
09char = plr.Character
10 
11else
12 
13char = plr.Character
14 
15char.HumanoidRootPart.Trail.Color = ColorSequence.new(Color3.fromRGB(color),Color3.fromRGB(color))
16 
17end
18 
19end)

It always prints numbers like 1, 0, 0 instead of 255,0,0. Please help!

2 answers

Log in to vote
1
Answered by 6 years ago

It is not working because you didn’t add the certain color you wanted into your Script!

0
Thats the color, its the frames background color. CaptainD_veloper 290 — 6y
0
Captain also read your roblox messages DuckyRobIox 280 — 6y
Ad
Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

line 1 should be

1script.Parent.Button1Down:Connect(function()

Plus you need to specify a color.

Answer this question