I have my own model of sword (named rusty dagger) and even animations for attack, idle and equipt. I searched thru whole youtube and google but I can just find any script that would work. no matter what script I write my dagger still doesnt do anything. Everytime I click nothing happens. I tryed four diffirent script allready but its still no doing anything. Does anyone have any idea what am I doing wrong or some script to send that would work? theese are script that I used: script.Parent
script.Parent
local function onTouch(partOther)
local humanOther = partOther.Parent:FindFirstChild("Huamnoid")
if not humanOther then return end
if humanOther.Parent == tool then return end
humanOther:TakeDamage(5)
end
local function slash()
local str =Instance.new("StringValue")
str.Name = "toolanim"
str.Value = "slash"
str.Parent = tool
end
tool.Activated:Connect(slash)
tool.Handle.Touched:Connect(onTouch)
second
script.Parent.blade.Touched:connect(function(p)
if script.Parent.CanDamage.Value == true then
script.Parent.CanDamage.Value = false
p.Parent.Humanoid:TakeDamage(20)
end
end)
local CanAttack = true
script.Parent.Activated:connect(function()
local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack)
if CanAttack == true then
attack:Play()
CanAttack = false
wait(1)
attack:Stop()
CanAttack = true
script.Parent.CanDamage.Value = true
end
end)

3 comments
code block, Also is there any errors?
it didnt show any errors
can you please put your codei n a codeblock?