Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I keep getting damaged everywhere I walk. How do I fix this?

if target then local damageDebounce = true local damageCor = coroutine.wrap(function() while true do wait() repeat wait() until (myRoot.Position - target.Position).magnitude >= 3 myHuman.WalkSpeed = 0 wait(.5)

			local human = target.Parent:FindFirstChild("Humanoid")
			if human and damageDebounce == true then
				damageDebounce = false
				human:TakeDamage(15)
				wait(1)
				damageDebounce = true

It keeps saying "Workspace.Basic Zombie.ZombieAi:30: attempt to index nil with 'FindFirstChild'"

1 answer

You can't use spaces while doing that. Instead, use something like workspace["Basic Zombie"].Zombie

This discussion is preserved as it was. New answers, comments, and votes are closed.