1973 sci-fi flick about robots that gain sentience and start a-killin'
The setting is a futuristic holiday spot where people can live out fantasies, one of which is Old West themed.
Of course sentient robots taking over the role of humans goes back extremely far in film, Fritz Lang's Metropolis (1927) has a robot taking over the role of a protest leader for example. But really the idea of humans being replaced by inhuman doppelgänger goes back even further through legends and stories (like the doppelgänger for one)