The userdata reference of npcs is not consistent

Describe the bug:
When printing self:GetEntity() on an npc, it always prints another reference, even if these should all show the same reference instead.

How do you cause this bug?

  • List the steps
    Attach this script to an npc:
local Test = {}
function Test:Init()
	print(self:GetEntity())
	print(self:GetEntity())
	print(self:GetEntity())
	print(self:GetEntity())
end
return Test

console output:

[Server] userdata: 0x7f31b9ac9070
[Server] userdata: 0x7f31b9ac9118
[Server] userdata: 0x7f31b9ac91c0
[Server] userdata: 0x7f31b9ac9268

Screenshots / video of bug:

Which platform: PC

Which input: keyboard + mouse

Your Crayta username: Daigoro

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

Version number (found in Help tab in Settings):
0.f3.28.120518

Hey there,
Thanks for taking the time to enter the bugs individually, I’ve seen the colossus level bug thread earlier today!! This one as been safely entered in our db!

Have a wonderful day!

1 Like