hey dude, idk if you still need help, but I got bored and succedded(screw spelling) and made the sword you were talking about
this is what I changed in the sword script in the sword function:
function Sword:Connect()
Handle.Touched:connect(function(hit)
local myPlayer = GLib.GetPlayerFromPart(Tool)
local character, player, humanoid = GLib.GetCharacterFromPart(hit)
if myPlayer~=nil and character~=nil and humanoid~=nil and myPlayer~=player then
local isTeammate = GLib.IsTeammate(myPlayer, player)
local myCharacter = myPlayer.Character
local myHumanoid = myCharacter and myCharacter:FindFirstChild'Humanoid'
if (Config.CanTeamkill.Value==true or isTeammate~=true) and (myHumanoid and myHumanoid:IsA'Humanoid' and myHumanoid.Health > 0) and (Config.CanKillWithForceField.Value or myCharacter:FindFirstChild'ForceField'==nil) then
local doDamage = Config.IdleDamage.Value
if Sword.State == 'Slashing' then
doDamage = Config.SlashDamage.Value
myHumanoid.Health = myHumanoid.Health + 5
elseif Sword.State == 'Lunging' then
doDamage = Config.LungeDamage.Value
myHumanoid.Health = myHumanoid.Health + 15
end
GLib.TagHumanoid(humanoid, myPlayer, 1)
humanoid:TakeDamage(doDamage)
end
end
end)
end
|