I made some code to generate a random number, and change the materials of the spawning platforms depending on what the set of teams is. Even though my print string shows a different number, every time the team colors are the same. How do I fix this?

I made some code to generate a random number, and change the materials of the spawning platforms depending on what the set of teams is. Even though my print string shows a different number, every time the team colors are the same. How do I fix this?
It is harder to debug blueprints if they are not lined up and tidy.
If I understand what is happening here correctly, you generate a random integer with a range of 0-3, and first you check if it is equal to 0.
If it is not equal to zero, you then check if it is equal to 3. If it is equal to three, then you set the material on a static mesh.
The images are too small to read - are the materials taking the correct inputs? Has a dynamic material instance been created? If you make a simple Input event (like press F) are you able to successfully change the material?
You’re partially right. It checks if the integer is 0, then it changes the material to something else. If it’s not, check the next possible number. It only doesn’t change the material if I’m playing as a client. It works in standalone, and for listen server I’m not sure, so it probably has something to do with the custom events I set up to make sure all the players have the same team colors.
You have a small logical error here. A new value is generated each time you get int from the RandomInt node. It would be best if you wrapped this node in a function to pin the output value.
Actually, the problem is it just didn’t change anything and used the default values for everything. It only did this when I made a custom even to do it on the server.