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)
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.
Simply just change
Joshpart.Visible = true
To
Joshpart.Transparency = 1
and do the oposite to make it invisible :)
PlayerAdded is not an event of StarterPack, but an event of Players.