Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Remote Event (client to sever) not working?

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 (Script Called Client Spreader)
    game.ReplicatedStorage.SendRequest.OnServerEvent:Connect (function (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
    end)

--Part of local script 

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


1 comment

0

we need to see the rest of the local script. In particular, the part that defines the Velocity variable. It's possible that you never actually set Velocity to a value, or that it wasn't declared in the first place.

1 answer

✓ Accepted answer

The reason for this, is because it has 3 values inside, X, Y, and Z. If you want to get the velocity, you would have to do

print("Player is"..Player.."Target is"..Target.."Damage is"..Damage.."Velocity is"..Velocity.X..', '..Velocity.Y..', '..Velocity.Z)

That is a way to print the velocity. Hope this helps!

This discussion is preserved as it was. New answers, comments, and votes are closed.