function onTouch(hit) if hit.Parent.Name=="Player2" or "Terrain" then game.Workspace.Bruh.BrickColor = BrickColor.new('Blue') else msg=Instance.new('Message', game.Workspace) msg.Text='You are not player one, So I'..'m '..'not '..'turning blue for you' wait(2) Message:Destroy()
end end script.Parent.Touched:connect(onTouch)~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
There are 2 mistakes in your script.
1) The line
if hit.Parent.Name == "Player2" or "Terrain" then
should be
if hit.Parent.Name == "Player2" or hit.Parent.Name == "Terrain" then
2) When you destroyed the "Message" object, you did it wrong. You assigned the "Message" object to be the value of msg (variable) so instead of:
Message:Destroy()
it should be
msg:Destroy()
I hope this fixed the problem.
I don't understand why did you close the quotes in the message's text so many times if there is no concatenation that needs to be done.