#How do I set a Color3 Value to The text property of a TextBox

48 messages · Page 1 of 1 (latest)

visual nest
#

Is the script in a local

vernal briar
#

No

#

Local...

#

It has local variables that you can't see i think but

#

I'm not sure

#

What u mean

hidden pelican
#

is the script in a localscript

#

@vernal briar

vernal briar
#

Hmm

vagrant heraldBOT
#

studio** You are now Level 10! **studio

vernal briar
#

No

#

Yep no I'm sure now

hidden pelican
#

put the script in a localscript

vernal briar
#

If I set the color value as something in specific then it will work. But cannot manage to change its color3 value through a players custom value

vernal briar
#

Okay

hidden pelican
#

wait

#

what are you trying to do?

vernal briar
#

Oh

#

Trying to have a player input a color3 value into a textbox

#

And then, click a button to make that value be set to everything in workspace

hidden pelican
#

so the player puts a color3 into a textbox and then they click then button and it changes the color of everything in workspace?

vernal briar
#

Yes

#

To the color they want

visual nest
#

oh i see the problem

#
for i,v in pairs(workspace.ConstructionZone.BuildingsMaterials:GetChildren()) do
      if v:IsA(Part) then```
vernal briar
#

Oh.

#

Hm

#

Wait i never added a do to my code

#

Strange

#

I wonder why it's there

vernal briar
#

OH LOL

#

It's i,v in pairs duh that's why-

#

Still not working doe :<

#
script.Parent.MouseButton1Click:Connect(function()
    for i,v in pairs(workspace.ConstructionZone.BuildingMaterials:GetChildren()) do
        if v:IsA("Part") then
            v.Color = Color3.new(script.Parent)
        end
    end
end)
#

I Think that It was fine before, but using script.Parent to change the color Is not working

visual nest
#

or its lua v.Color = Color.fromRGB()

vernal briar
#

Hm

#

Okie

#

fromRGB is for when you're doing things like this in specific?

#

Don't understand why that's a second option

visual nest
#

im dumb

#
v.Color3.fromRBG = Color3.new(Number,Number,Number)```
#

im not on roblox at the moment so i dont know if thats correct

vernal briar
#

Hm

#

Okie dojoe

#

Dokie