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

[SOLVED] i want a script to change the color of a color3value can someone help me?

Asked by 5 years ago
Edited 5 years ago

this is the script i made you have to look on line 9 i don't know how to change this with a script I have tried it several times

oof = game.ReplicatedStorage.Markers.Bank.Config.BurstType
color = game.ReplicatedStorage.Markers.Bank.Config.MarkerColor

script.Parent.Touched:Connect(function()
    oof.Value = "Police"
    wait(10)
    oof.Value = "Niks"

    color.Value = "107,107,107"
end)

1 answer

Log in to vote
0
Answered by 5 years ago

The Color3Value's Value property is a Color3, not a string.

You can create a Color3 with the Color3.new or Color3.fromRGB constructors.

The former takes arguments from 0-1 where the latter takes arguments from 0 to 255.

oof = game.ReplicatedStorage.Markers.Bank.Config.BurstType
color = game.ReplicatedStorage.Markers.Bank.Config.MarkerColor

script.Parent.Touched:Connect(function()
    oof.Value = "Police"
    wait(10)
    oof.Value = "Niks"

    color.Value = Color3.fromRGB(107, 107, 107) -- or Color3.new(107/255, 107/255, 107/255)
end)
Ad

Answer this question