I am trying to make a simple ontouched script that when you touch a brick, it turns red
function onTouched(hit) game.Workspace.Ebin.BrickColor.New = "Bright Red" end Script.Parent.Touched:connect (onTouched)
well here is the script you Need to use for right now.
game.Workspace.Ebin.Touched:connect(function(hit) game.Workspace.Ebin.BrickColor = BrickColor.new("Bright red") end)
here is everything you did wrong
function onTouched(hit) game.Workspace.Ebin.BrickColor.New = "Bright Red" end --Brickcolor.new -- Brickcolor = Brickcolor.new("Bright red") Script.Parent.Touched:connect (onTouched)
function ot() script.Parent.BrickColor = BrickColor.new("Bright red") end script.Parent.Touched:connect(ot)
Just copy and paste this script and insert it into a brick. Hope it helps !