Cannot listen to onCollision on shapes from a script

Describe the bug:

If you call code like shape.onCollision:Listen(self, "Handler"), an warning is shown in the console, and the listener does not function.

[Server] [Warning] Cannot Listen to an event which isn’t owned by an IPZScriptEventStore

How do you cause this bug?

Place this script in the world:

local BugScript = {}

-- Script properties are defined here
BugScript.Properties = {
	-- Example property
	--{name = "health", type = "number", tooltip = "Current health", default = 100},
	{ name = "shape", type = "entity" },

--This function is called on the server when this entity is created
function BugScript:Init(), "HandleCollision")

function BugScript:HandleCollision()

return BugScript

  • Place a shape in the world
  • Assign the shape to the shape property
  • Preview the game, try running into the shape

Screenshots / video of bug:

Which platform: PC

Which input: keyboard + mouse

Your Crayta username: Cereal

Game seen in (including “Hub” or “Editor for XYZ”): Editor

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): Every time

Time + date seen: October 16 2022

Version number (found in Help tab in Settings): 0.h1.98.133663

Hi @Cereal,

I’ve reproduced the issue and sent it through to the developers, thanks for the report!