What do you want to achieve?
I want to make a sword that deals damage only when the canDamage value = true
What is the issue?
It is simply doesnt works! It become true and nothing happens for some reason
What solutions have you tried so far?
I’ve tried cheking it with “if”, but it does’nt work
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
local cDvalue = script.Parent.Parent.Parent.canDamage
if cDvalue.Value == true then
print('Worked!')
hit.Parent:FindFirstChild('Humanoid'):RemoveAccessories()
else
return
end
end
end)
is the code hit.Parent:FindFirstChild('Humanoid'):RemoveAccessories() supposed to simulate a damage function? if not so you can deal damage to humanoid via :Takedamage()
No its not collision, i said that bool value activates, but in the hitbox script the “if” check doesnt works for some reason, it may be bc of the timing with wait()