Sword Smith | Script Swords in Just Minutes! [FREE]

this modlue is insane, but can i add animation when critical hit?
and dualWield not working, it will tell me:

 ServerStorage.SwordSmith:549: ServerStorage.SwordSmith:550: attempt to index nil with 'Character'

also and Speical abilities not working, it tell me:

ServerStorage.SwordSmith:638: attempt to index nil with 'PlayerGui'

How do i add anti team kill? or atleast only damaging npcs

You know what this is such an amazing module! I love it

I got 1 question how do we disable the preset hitboxes and add our own? Also you should do a more in depth documentation (especially on all the settings) as this has some elements that are pretty hard to understand

The best way to do that would be to put a bool value into the character of the person hit, and when they are hit search if the bool is true (or false) alternatively you could add an attribute to the humanoid or the character (this could be a string or another bool value) and search for the person hit.

This will be a feature of the next Sword Smith module I’m currently in the process of making right now, the current version is incapable of doing this. However, since this option isn’t currently available, it’s worth a shot to check out Raycast Hitbox, a free resource that allows you to create hitboxes very similar to those found in Sword Smith.

You are a very good person for doing this! Thank you so much for this amazing module, I got couple of suggestions first one blocking dmg etc the second one I would recommend you do a more in depth tutorial on what all of the different settings do etc!

I Know its a little old but im struggling to get the animtions to work everything else works great just wont play my animation

local ServerStorage = game:GetService("ServerStorage")
local SwordSmith = require(ServerStorage:WaitForChild("SwordSmith"))

local tool = script.Parent
local debounce = false
local data = {swingAnims={8358215765},
knockBackEnabled = true,
knockBackStrength = 50,
criticalHits = 5, --How much damage is dealt to the target on a critical hit
criticalInterval = 1,
currentDamage = 2,
}

local sword = SwordSmith.new(tool, data)

tool.Activated:Connect(function()
	if debounce then
		return
	end

	debounce = true
	sword:Swing()
end);

sword:OnSwingEnded(function()
	--You can of course add extra delay if you have a short swing animation
	debounce = false
end)

Have you made sure that the AnimationPriority is set to action? Otherwise please reply with any errors you received.

1 Like

I’ll check that I don’t believe it is on action

It worked Thank you so much great module btw

How would I make an IDLE animation with this?

local data = {
	swingAnims = { --For swords compatable with both rig-types
		R6 = {00000},
		R15 = {00000}
	},
	holdAnims = { --List of animations played in sequence when sword is equipped
		0000,
		0000,
	}
	killsStat = {
		StatName = "Kills"
	},
	Trail = false, --The automatically generated trails are quite-buggy, so creating your own may be a good choice
	ignoreList = {game.Players.Arc_Cosine.Character}, --Characters of people who are uneffected by the sword
	killPlayers = false --If you only want the sword to kill NPCs, set this to false
}

Paste ur idle animation in holdAnim

So would the IDLE be the last in the sequence?

U don’t need to add sequence

holdAnims = { --List of animations played in sequence when sword is equipped
		0000,
}

it is if u have multiple idle animation which will work at random if they are not looped or change after every swing if looped

Alright! Thanks!

got an output of the module updating and now there are couldn’t load module errors along with an expected end

I believed I just fixed the issue

Ok so this is great - Amazing - makes things so much easier for someone like me not so experienced with scripting but…

I followed the tutorial exactly. Everything worked, the animation, the damage, only when I equipped the weapon, it showed up like 2 feet away from the character then glitched out of the world.
I think it’s something I did wrong, but not sure exactly what. It might be something to do with the anchoring?

EDIT: Also how can I get a pre-made effect to play when I do the basic swing?

EDIT: I fixed the first issue now. I just need to know how to play my effect at the same time.

yup its fixed thanks gonna mess around with the module a bit more