Thanks, no we just determine the damage value and pass it, this includes if it is critical or not. So on that note, do we need to include the critical declarations in the data table? it won’t hurt if we don’t use them but just curious.
The criticalInterval
key must be declared in the data table to my knowledge, I haven’t worked on this project in quite some time so I can’t be entirely sure. I do plan on creating a v2 in the future.
I wondering if you could add anti Team kill! It would be very cool if there’s!
I don’t believe this is currently possible in Sword Smith, you might need to do a little digging into the documentation, but as far as I can see it’s not possible. I probably won’t be updating it to have this feature because like I said
But this probably won’t be done until November or late October.
Thank you for your comment though because I now plan on adding this to the new version whenever it’s coming out!
What if I want to change the damage for different sword and is it possible to add 2 Ability into a sword? Also, do we make a new script for special ability or just add into the Sword Script? ;-;
Could this be used to get cash when killed another player? (cash on kill)
To add a custom damage value to your sword you can pass the damage parameter when calling the :Swing
method.
sword:Swing(some number);
Yes, it is, you may add any amount of abilities.
You should only need one script for your sword.
You can use the TargetKilled
event to add to a cash stat:
local statName = "Cash"; -- name of your leader stats
local amount = 250; -- amount of cash given to a player
sword:OnTargetKilled(function()
sword:GetOwner():WaitForChild("leaderstats")[statName].Value += amount;
end);
What do you mean One Script? Do you mean I just have to add Special Ability into the main Sword Script?
I mean that only one script is required to handle the whole entire sword, special abilities included.
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.
I’ll check that I don’t believe it is on action