#Why does my code stop executing at this line?

1 messages · Page 1 of 1 (latest)

winter silo
#

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
#

There aren't any errors or anything

gilded rune
winter silo
gilded rune
#

but everything before the invokeserver happens

winter silo
#

yeah everything before it does

gilded rune
#

where is the onserverinvoke

#

its on a script on the server right

#

like where is all of this

stateManagerRF.OnServerInvoke = function(plr)
    print("ServerInvoke")
    print(plr)

    local stateKey = stateManager.GetStates(plr, "Parrying")
    if stateKey == nil then
        stateKey = false
    end

    return stateKey
end
winter silo
#

yes, it's a script on the server under a module script

#

replicatedstorage though

#

idk if that changes anytthing

gilded rune
#

just put it into serverscriptservice

winter silo
#

okay

#

oh what the it works now

gilded rune
#

sensational

winter silo
#

i guess ill finally watch a video about the folders

gilded rune
#

What

#

Services

winter silo
#

wdym

gilded rune
#

i guess ill finally watch a video about the folders

#

what does this entail

winter silo
#

ima be watching tutorials about the difference between serverstorage and replicatedstorage and different stuff LOL

gilded rune
#

interesting

#

Surprising that you can use a remotefunction but not know what those are

#

Either skidding or your a wierdo

winter silo
#

i mean

#

i do know what it is lol

gilded rune
#

I didnt ask for your life story buddy

#

move on

winter silo
#

OK

#

DAMN

wooden marsh
#

u should put print in for loop coz outside it becomes a global and then luau not able to find that var

gilded rune
wooden marsh
#

u typed my name wrong