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

Color Value turning Black when Used in Parts?

Asked by
xEiffel 280 Moderation Voter
6 years ago

The main problem here is the fact that everytime I hit 'Submit' on my button the color turns 'Black', I don't know why it does this, Its being called from the server so everyone can see it and in there is the set which it should get the children of and the color it should be, the color is in a Color3Value, and whatever color you pick when u hit the submit button it changes that Color3Value. I don't know how to fix this, help would be lovely!

Here are the scripts.

This is in a Local Script inside the Color Wheel Submit button.

ListenToGameEvent.PaintObject:FireServer(script.Parent.Parent.Color, script.Parent.Parent.Parent.ColorSelect.DisplayElement.Caller)

This is in a Server Script inside the model

ListenToGameEvent.PaintObject.OnServerEvent:Connect(function(Player, Color, Set)
    for _,Set in pairs(script.Parent:FindFirstChild(Set.Value):GetChildren()) do
        Set.Color = Color3.new(Color.Value)
    end
end)
0
Color3.new takes 3 values; if `Color.Value` is already a Color3, then you don't require the function. TheeDeathCaster 2368 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Set.Color = Color.Value is everything you need!

0
Thanks! xEiffel 280 — 6y
Ad

Answer this question