local Sword = script.Parent local function onTouch(partOther) local humanOther = partOther.Parent:FindFirstChild("Humanoid") if not humanOther then return end if humanOther.Parent == Sword then return end humanOther:TakeDamage(5) end local function slash() local str = Instance.new("StringValue") str.Name = "toolanim" str.Value = "Slash" str.Parent = Sword end Sword.Activated:Connect(slash) Sword.Handle.Touched:Connect(onTouch)
What do you mean it doesn't work. I tested it and it works perfectly fine. Make a tool in StarterPack, add a part to that tool(or your your sword mesh/model, just make sure the handle is a part), name the part "Handle", add a normal script to the tool, paste your code in the script. Test it.
I just needed to change the damage script in the sword to a local script!