Describe the bug:
How do you cause this bug?
- List the steps
Trying to :Show() a widget to single client. Widget is attached to NPC.
Script on the NPC sends itself to a script running on the user using Adams LocalHandler package.
DoOnLocal loses the NPC entity upon being local
function LocalHandlerScript:DoOnLocal(entity, functionName, …)
print(“This should always print…”)
print(“Local Handler Called - functionName…”,functionName)
print(“Entity is:”,entity:GetName())
if self:GetEntity():IsLocal() then
print(“This is local sending…”)
entity:SendToScripts(functionName, …)
else
print(“Not local!”)
self:SendToLocal(“DoOnLocal”, entity, functionName, …)
end
end
Outputs:
[Server] Sending DoOnLocal
[Server] This should always print...
[Server] Local Handler Called - functionName.. ClientShowChevron
[Server] Entity is: nPC1TankDynamic91165
[Server] Not local!
----
[Client] This should always print...
[Client] Local Handler Called - functionName.. ClientShowChevron
[Client] [Error] localHandlerScript:13: attempt to index local 'entity' (a nil value)
stack traceback:
localHandlerScript:13: in function <localHandlerScript:10>
Screenshots / video of bug:
Which platform: PC
Which input: keyboard + mouse
Your Crayta username: Arescaries
Game seen in (including "Hub" or "Editor for XYZ"): All
How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): Everytime
Time + date seen:
Version number (found in Help tab in Settings):
(PC only) hardware specs (upload dxdiag file if possible - https://support.microsoft.com/en-us/windows/open-and-run-dxdiag-exe-dad7792c-2ad5-f6cd-5a37-bf92228dfd85):
**Remember!**
The more information you provide, the more likely it is that this bug can be fixed quickly! Also, if this was discussed in Discord / Reddit / elsewhere, it might help to include a screenshot of that discussion!