Yue Posted June 13, 2019 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 Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Solution gamecreator Posted June 13, 2019 Solution 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
Yue Posted June 13, 2019 Author 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 Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
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.