I want the color of the PointLight the same color of the GUI TextButton. Help?
mu has the correct answer, but his code is inefficient:
local light = workspace.Part.PointLight --set this to the PointLight object local gui = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame --set this to the GUI object you want to draw from. gui.Changed:connect(function() light.Color = gui.BackgroundColor3 --Or, as mu said, TextColor3 or BorderColor3 end)
Assuming you have the Script in the button and a PointLight in a part in the workspace
local Light=workspace.Part.PointLight coroutine.wrap(function() while wait() do Light.Color=script.Parent.BackgroundColor3 --Or TextColor3, BorderColor3, etc... end end)()