# Blueprint scripting for changing color works for static meshes except one

**URL:** <https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457>\
**Category:** Rendering\
**Tags:** interactive-objects, unreal-engine, bug-report, editor, Blueprint, question\
**Created:** [October 19, 2017, 9:47pm UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457 "2017-10-19T21:47:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c00765c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c00765c](https://forums.unrealengine.com/u/anonymous_user_1c00765c)\
**Post date:** [October 19, 2017, 9:47pm UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/1 "2017-10-19T21:47:55Z")

</div>

Hi guys,

I wanted to make my scene interactive while in game play so I started making some blueprints. I’m very new at this so I followed tutorials for guidelines. I successfully made some of my static mashes (furniture) to change color with the same pattern except one. One of the walls in the room I want to change color, but the same blueprint scripting that I used on the other meshes doesn’t seem to work in this case. I don’t know what’s the problem.

Here are some screenshots of the settings in the blueprint for the furniture…

 ![217289-working-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/d/91d8bdacc1208b408244c08db677cd36fce90c9b.jpeg)

 ![217291-working-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/3/f03d55ba98d62a4a84b98b1758ee2a85dc567679.png)

and for the wall…

 ![217292-not-working-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/9/2a9c2944226b5e75afeabf05e40cb7a8b06ed54b.jpeg)

 ![217293-not-working-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/e/f4e925ed0aacd745cdff87288149fce8d2c977db.png)

 ![217294-not-working-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/9/3b9164d86aedf664228fc8661781ec71ccfbbb07.png)

I could use some help!  
Tnx

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 19, 2017, 10:09pm UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/2 "2017-10-19T22:09:11Z")

</div>

There’s no source material selected in _not-working-2.png_.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c00765c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c00765c](https://forums.unrealengine.com/u/anonymous_user_1c00765c)\
**Post date:** [October 21, 2017, 10:03am UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/3 "2017-10-21T10:03:38Z")

</div>

I added the source material but nothing changed!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 21, 2017, 11:08am UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/4 "2017-10-21T11:08:43Z")

</div>

Could you please show a screenshot of the wall material setup?  
Also, put a _PrintText_ node after _F_ and see if it prints at all; perhaps the key input is not being sent.

The rest looks good at a glance.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c00765c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c00765c](https://forums.unrealengine.com/u/anonymous_user_1c00765c)\
**Post date:** [October 21, 2017, 11:35am UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/5 "2017-10-21T11:35:58Z")

</div>

Ok, so I thought something is wrong with the mesh, so I made a new blueprint for another wall, after I made the blueprint I build the lightning and restart the scene. When I opened the scene and put it in to game mode the first wall that didn’t work it stared to change color but now the new wall has the same problem. Any thoughts? Btw here a screenshot of the wall material…

 ![217455-material-settings.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/f/fbf1e0f7b720a5dd9e04a410c656ff3f85e2c41d.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 23, 2017, 7:20am UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/6 "2017-10-23T07:20:42Z")

</div>

My guess would be that the F key consumes input (select the F node and check details panel) and once it does, nothing else has the chance to react to the F key anymore.

If you are planning on having multiple objects react to the same action, you should place the triggering logic elsewhere; ideally some place where it can be executed globally.

For example, create a _CustomEvent_/_Function_ for the objects that need to react to colour changes. Use the F key in your _LevelBlueprint_, get the objects you want to interact with and call their ColourChange event/function.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c00765c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c00765c](https://forums.unrealengine.com/u/anonymous_user_1c00765c)\
**Post date:** [October 29, 2017, 1:25pm UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/7 "2017-10-29T13:25:30Z")

</div>

So sorry for the late response, I’ve checked the key input and seems ok… or maybe not… btw now it’s working, I updated the new 4.18 version and only changed the size of the box collision because it was interacting with the other box collision from different blueprint mesh. Could that be the problem?

 ![218317-key-input.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/c/73c88d3d1285c8a38379de08a8f3238e664127ea.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 29, 2017, 2:14pm UTC](https://forums.unrealengine.com/t/blueprint-scripting-for-changing-color-works-for-static-meshes-except-one/407457/8 "2017-10-29T14:14:21Z")

</div>

> […]btw now it’s working

If you managed to get it to work the way you need, please consider marking the issue as resolved.
