#Why does eChar return me instead of "Rig"?

1 messages · Page 1 of 1 (latest)

amber geyser
#

This script is a local script, lp = localplayer
V is an entity

knockbackRF:InvokeServer(lp, v.Parent)
print(v.Parent)

Snippet of knockback script:

rf.OnServerInvoke = function(pChar, eChar)
    print(pChar)
    print(eChar)
    if pChar and eChar then

When v is printed, it returns "Rig"
in the knockbackRF script, pChar returns me, but eChar returns me aswell

robust viper
#

the first parameter of a remote function or eventis always who fired it so just do
knockbackRF:InvokeServer(v.Parent)

and on the server it should be

rf.OnServerInvoke = function(pChar, eChar)
print(pChar) -- the player who called
print(eChar) -- the rig
end

amber geyser
#

ohhh okay

#

alrighty thx

robust viper
#

so in your script knockbackRF:InvokeServer(lp, v.Parent) roblox sees it like
knockbackRF:InvokeServer(player ,lp, v.Parent)