i am trying to make a simulator game its almost done i need it so when i punch the strength will be as strong as the leaderstats
also i found a working tutorial for the script but i tried to make it so the strength to kill will be as strong as the leaderstats:
local func= script.Parent.punched
game.Players.PlayerAdded:Connect(function(player) -- this may sound dumb but i put this so i can use the players leaderstats
func.OnServerInvoke = function(plr, hum, dmg, tor)
local sound= Instance.new("Sound")
sound.SoundId= "rbxassetid://137579113"
game.Debris:AddItem(sound,5)
sound.Parent=tor
sound:Play()
hum.Parent.Humanoid:TakeDamage(player.leaderstats.Strength.Value) -- here is where the script wont work
end
end)

1 comment
errors would be nice.. Also if the script is a local script or a normal script. We are no magicians.