I have made a spike and when the player hits it i want the player script to print out spike detected. But i belive there is a problem with the collision objects masks because every time my player hits a spike nothing happens. Does anyone know what could be causing this?
Screenshots showing the collision object for the player and spike:
code which should run when the contact is made
local group_spike = hash("spike")
function on_message(self, message_id, message, sender)
if message_id == group_spike then
print("spike detected")
end
end