Yue Posted June 13, 2019 Share Posted June 13, 2019 I want to change the color of the eye material, however it applies to all models. And the script is only attached to a single mesh of the robot. Any suggestions? local surface = self.entity:GetSurface(0) --Get the surface material local material = surface:GetMaterial() material:SetColor(1,0,0) Quote Link to comment Share on other sites More sharing options...
Solution gamecreator Posted June 13, 2019 Solution Share Posted June 13, 2019 You need to load the models in as separate copies first. Check out this thread: https://www.leadwerks.com/community/topic/12249-model-copy/ 1 Quote Link to comment Share on other sites More sharing options...
Yue Posted June 13, 2019 Author Share Posted June 13, 2019 local enemy = Model:Load("Models/Characters/Player/Yue.mdl",1) local amarillo = Material:Load("Models/Characters/Player/Negro.mat",1) amarillo:SetBlendMode(Blend.Solid) enemy:SetMaterial(amarillo) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.