Answered by
4 years ago Edited 4 years ago
You can fire the amount of strength the player has to the server.
For example:
2 | local RemoteEvent = game:GetService( "ReplicatedStorage" ):WaitForChild( "MyEvent" ) |
3 | local player = game.Players.LocalPlayer |
4 | local leaderstats = player:WaitForChild( "leaderstats" ) |
5 | local Strength = leaderstas.Strength |
7 | RemoteEvent:FireServer(humanoidHit,Strength.Value) |
Now that we are giving the event the amount of damage the player can do, what we can do is:
2 | local RemoteEvent = game:GetService( "ReplicatedStorage" ):WaitForChild( "MyEvent" ) |
4 | RemoteEvent.OnServerEvent:Connect( function (player,humanoidHit,StrengthValue) |
5 | humanoidHit:TakeDamage(StrengthValue) |