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

How do i apply a color script from a value?

Asked by 6 years ago

Sorry for the title, i can't really explain it from a title.

What i'm trying to say is that im trying to make:

mouse.KeyDown:connect(function(keys)
    if keys =="f" then
    if mouse.Target ~= nil then
        if mouse.Target.Material==Enum.Material.Pebble then
            local SelectBox = Instance.new("SelectionBox", mouse.Target)

            SelectBox.Adornee = mouse.Target    
            SelectBox.Color3 = Color3.fromRGB(script.Parent.Color.Value)
            print"done"


        end end
    end
end)

The Color Value is a color3 value, but when i use the script the selectionbox appears to be black?

0
i think thats the default idk but did you change the values in the color3 value? LordOfWatermelons 27 — 6y
0
Yep. Still doesntwork TinfoilbotGamer 35 — 6y
0
Mouse.KeyDown is deprecated. What’s the Value of the Color3Value? User#19524 175 — 6y

1 answer

Log in to vote
0
Answered by
lunatic5 409 Moderation Voter
6 years ago

First of all, Mouse.KeyDown is deprecated. While it would be a good idea to use a new method, I don't think is your main problem here. In line 8, try just typing:

SelectBox.Color3 = script.Parent.Color.Value

Hope this helps! If it does, please accept my answer!

Ad

Answer this question