workspace['Rasengan test dummy'].Humanoid.Touched:Connect(function(Rasengan)
if (Rasengan) ~= nil then local Humanoid = Rasengan.Parent:FindFirstChild(“Humanoid”) or Rasengan.Parent.Parent:FindFirstChild(“Humanoid”)
if (Humanoid:IsA(“Humanoid”) and Humanoid) then
for i = 1,10,10 do
Humanoid:TakeDamage(10)
end
end
end
end)
why im i getting this error when im trying to damage to the dummy?
4 answers
Your issue is being caused because you’re trying to use the method :TakeDamage() on the Part you touched, yet the Part you thing you touched, isn’t a Humanoid. When using.Touched you use the arguments provided by the function, which is the part that touched.
This would be, what you gave it as a reference in the perimeters, ‘Rasengan‘. This should then be written like so
workspace[“Rasengan test dummy”].Humanoid.Touched:Connect(function(Rasengan)
if (Rasengan) ~= nil then
local Humanoid = Rasengan.Parent:FindFirstChild(“Humanoid”) or Rasengan.Parent.Parent:FindFirstChild(“Humanoid”)
if (Humanoid:IsA(“Humanoid”) and Humanoid) then
for i = 1,10,10 do
Humanoid:TakeDamage(10)
end
end
end
end)
You also forgot a peramiter on the for loop, the third number is how much it does up
script.Parent.Touched:Connect(function(hit)
Jbrick.Anchored = true
human1 = hit.Parent --idk what this is for
human = hit.Parent:FindFirstChild('Humanoid')
if human then --checks if human is true
human:TakeDamage(10)
print('yes')
end
end)
small error ur doing hit.Parent:FindFirstChild("Humaoid") so it will be nil. i fixed it to be humanoid. a model can't take damage so a humanoid can take damage.
3 comments
upvote and mark if it helped :)
lol true human
:/
Simply just change
Joshpart.Visible = true
To
Joshpart.Transparency = 1
and do the oposite to make it invisible :)
1 comment
Transparency 1 is completely invisible.
PlayerAdded is not an event of StarterPack, but an event of Players.
1 comment
Also assuming that joshpart is a Part, visible is not a thing. The right thing to do would be joshpart.Transparency = 0
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
What errors are you getting? Did you properly define Jbrick?
yes
Please include the full script, as we do not know what Jbrick is defined as.
yay
XD\