So my Output is saying that "Humanoid is not a valid member of Workspace" and Humanoid is a valid member of my dummies and my dummies are in the Workspace. So whats up with that. Is Humanoid only a member in my dummies or what? I don't know? Anyways here is my script.
Normal Script for Damage:
script.Parent.LinkedSwordModel.BladePart.DamagePart.Touched:Connect(function(p)
if script.Parent.CanDamage.Value == true then
script.Parent.CanDamage.Value = false
p.Parent.Humanoid:TakeDamage(20)
end
end)
Local Script for Animations:
local CanAttack = true
script.Parent.Equipped:Connect(function()
local Idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle)
local Slash = script.Parent.Parent.Humanoid:LoadAnimation(script.Slash)
Idle:Play()
end)
script.Parent.Activated:Connect(function()
local Idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle)
local Slash = script.Parent.Parent.Humanoid:LoadAnimation(script.Slash)
if CanAttack == true then
Slash:Play()
Idle:Stop()
CanAttack = false
wait(1)
Slash:Stop()
Idle:Play()
CanAttack = true
script.Parent.Value = true
end
end)

4 comments
Oh yes by the way it says "not a valid member" in the output
Please put all of your code in the code block
Its in the code brackets now
Yes, the Humanoid Object is only accessible within the Dummy Model.