Movies where main character thinks its fake, but it isn't

Should of thought of this one before: Westworld. The people think the Yul Brynner gunslinger character is a harmless robot, but it’s actually gone rogue and is killing people.