So For EX. Perhaps My Strength Is 1. I Would Want To Do 1 DMG. Any One Know How To Do That?
local remoteEvent = game.ReplicatedStorage.OnSuccessfulHit remoteEvent.OnServerEvent:Connect(function(plr, humanoidHit) humanoidHit:TakeDamage(10) end)
You can fire the amount of strength the player has to the server.
For example:
--LocalScript that fires local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("MyEvent") local player = game.Players.LocalPlayer local leaderstats = player:WaitForChild("leaderstats") local Strength = leaderstas.Strength --Your strength value within the leaderstats 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:
--ServerScript local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("MyEvent") RemoteEvent.OnServerEvent:Connect(function(player,humanoidHit,StrengthValue) humanoidHit:TakeDamage(StrengthValue) end)