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 5 years ago
Edited 5 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:

script.Parent.MouseButton1Click:Connect(function()

    game.ReplicatedStorage.ChangeTrailColor:FireServer(script.Parent.Parent.ColorDisplay.BackgroundColor3)

    script.Parent.Parent.Visible = false

    print(script.Parent.Parent.ColorDisplay.BackgroundColor3)

    end)

Here is server side script:

game.ReplicatedStorage.ChangeTrailColor.OnServerEvent:Connect(function(plr, color)



if not plr.Character then

plr.CharacterAdded:wait();

char = plr.Character

else

char = plr.Character

char.HumanoidRootPart.Trail.Color = ColorSequence.new(Color3.fromRGB(color),Color3.fromRGB(color))

end

end)

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

2 answers

Log in to vote
1
Answered by 5 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 — 5y
0
Captain also read your roblox messages DuckyRobIox 280 — 5y
Ad
Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

line 1 should be

script.Parent.Button1Down:Connect(function()

Plus you need to specify a color.

Answer this question