So here's the deal;
I have a block called "Light". Light changes color between Mid Gray, Bright Blue, and Bright Red. Now, my objective is to have it so a block called "Head" will change position upon the color change of Light, each color having a specific position. Light has two different scripts, the one that lets it change color and then one I struggle with. Light and Head both exist in a model called "TheCanopy". Here is my script, I think I'm close:
function touched(hit)
if game.Workspace.TheCanopy.Light.BrickColor == BrickColor.new("Bright Blue") then
game.Workspace.TheCanopy.Head.Vector3.new(188.5, 262, -129)
end
if game.Workspace.TheCanopy.Light.BrickColor == ("Bright Blue") == false then
end
if game.Workspace.TheCanopy.Light.BrickColor == BrickColor.new("Bright Red") then
game.Workspace.TheCanopy.Head.Vector3.new(179.5, 262, -129)
end
if game.Workspace.TheCanopy.Light.BrickColor == ("Bright Blue") ==false then
end
end
script.Parent.Touched:connect(touched)
Output says nothing (big help, huh?) and it does not work. This is rather important as it's for my group. If there's a problem, please fix it, post it, and tell me why, if you'd be so kind.
Thanks to all of those that help me,
-Tidbit1 |