So, here's what I am thinking would be the best way of doing so:
Player = game.Players.LocalPlayer Mouse = game.Player:GetMouse() -- I don't know if you need this if you add animations or if you just need it for anything dealing with keydown events script.Parent.KeyDown:connect(function() if key == "r" then script.Parent.BrickColor = BrickColor.new("Really red") end end)
Alright, so that's basically what I think of how you'd change the color of a certain part. But here's what I need it to do:
I need it to basically Insert a Dynamic Lighting "Really red" light into the brick.
I need it to actually change colors, if you press each key, as in Red, Green, OR Blue.
Player = game.Players.LocalPlayer Mouse = game.Player:GetMouse() -- I don't know if you need this if you add animations or if you just need it for anything dealing with keydown events script.Parent.KeyDown:connect(function() local light = Instance.new("PointLight", script.Parent) if key == "r" then script.Parent.BrickColor = BrickColor.new("Really red") --Assuming "script.Parent" is a part light.Color = Color3.new(255,0,0) elseif key == "g" then script.Parent.BrickColor = BrickColor.new("Lime green") light.Color = Color3.new(0,255,0) elseif key == "b" then script.Parent.BrickColor = BrickColor.new("Really blue") light.Color = Color3.new(0,0,255) end end)
Try this one. PointLights and Spot lights use Color3
instead of BrickColor
.