mirror of
https://github.com/Winded/RagdollMover.git
synced 2025-03-04 03:13:36 -05:00
initialize pl to LocalPlayer() to fix "table index is nil" error when hotloading
This commit is contained in:
parent
1f521b474d
commit
dfb85d538c
@ -2712,7 +2712,8 @@ local RGM_NOTIFY = { -- table with info for messages, true for errors
|
||||
[BONE_UNFROZEN] = false,
|
||||
}
|
||||
|
||||
local pl
|
||||
-- If we hotload this file, pl gets set to nil, which causes issues when tables attempt to index with this variable; initialize it here
|
||||
local pl = LocalPlayer()
|
||||
|
||||
hook.Add("InitPostEntity", "rgmSetPlayer", function()
|
||||
pl = LocalPlayer()
|
||||
|
Loading…
Reference in New Issue
Block a user