Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Remote Event (client to sever) not working?

Asked by 6 years ago

ERROR: ServerScriptService.ClientSpreader:4: attempt to concatenate local 'Velocity' (a userdata value)

or sometimes

ServerScriptService.ClientSpreader:4: attempt to concatenate local 'Velocity' (a nil value value)

Aparently the velocity value is sometimes nil or a player value??? it is normaly a vector3 value. What is the problem here

--Server Script (Called Client Spreader)
function game.ReplicatedStorage.SendRequest.OnServerInvoke(Player,Target,Velocity,Damage)
    print("Player is"..Player.."Target is"..Target.."Damage is"..Damage.."Velocity is"..Velocity)
    Target.leaderstats.Damage.Value = Damage
    Target.Character.Torso.Velocity = Velocity
    Target.leaderstats.LastHit.Value = Player.Name
    print("YAAAAAAAY")
    end

--Part of local script

SendRequest:InvokeServer(K,Velocity,Damage.Value)

I think the problem is with the server script, and something about the order of the parameters, but i dont know for sure. What is wrong here?

1 answer

Log in to vote
0
Answered by 6 years ago

If you are sending a request to the server its FireServer() not InvokeServer()

0
even with a remote event,same error comes up User#17125 0 — 6y
Ad

Answer this question