Code being executed:
for i, v in pairs(createHitbox) do
if v.Parent:FindFirstChild("Humanoid") and not humsHit[v.Parent.Name] and v.Parent ~= char then
local distance = (char:FindFirstChild("HumanoidRootPart").Position - v.Position).Magnitude
print("2")
if distance <= 4 then
local isParrying = stateManagerRF:InvokeServer(v.Parent)
--CODE STOPS HERE!!!!!!!!!!!!!!!!
print("3")
print(isParrying)
3 and 'isParrying' dont get printed, but if they go before the local isParrying = stageManagerRF:InvokeServer() line, they print (except for isParrying, obviously)
stateManagerRF Context:
stateManagerRF.OnServerInvoke = function(plr)
print("ServerInvoke")
print(plr)
local stateKey = stateManager.GetStates(plr, "Parrying")
if stateKey == nil then
stateKey = false
end
return stateKey
end