Thank you for replying to my question. I am colliding with a pivot, not the box itself. Please excuse me for my badly formulated post, english is not my first language. I will do my best to try and formulate myself more clearly.
Below is a picture of my scene
Below is the (not working) code for the pivot right in front of the player
function Script:Collision(entity, position, normal, speed)
if (entity:GetKeyValue("name") == "Player") then
CallFunction("test123");
end
end
below is the code for box1
Script.Material1 = "" --path
function test123()
self.entity:SetMaterial(self.Material1)
end
I want the material on box1 to change when I collide with the pivot.
Please note that the code I posted, probably is wrong, and is only here to demonstrate what i wish to achieve