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

[ SOLVED ] Why won't NPC walk to block on remote event fire?

Hi, so, I reused this NPC walking script from another NPC that I have and it works for that one. The second NPC, won't move. It's the exact same NPC as the other one, there's nothing different! Walking script (Normal script):


model = script.Parent.Parent
hum = script.Parent.Humanoid
torso = script.Parent.HumanoidRootPart

game.ReplicatedStorage.TheNextTalk.OnServerEvent:Connect(function(plr)
	
	if model.PointA ~= nil then
		local a = model.PointA
		hum:MoveTo(a.Position, a)
		repeat
			wait(0.1)
		until (a.Position - torso.Position).magnitude <= 5
	else
		print("No Point A.")
	end
wait(0.1)
	if model.PointB ~= nil then
		local b = model.PointB
		hum:MoveTo(b.Position, b)
		repeat
			wait(0.1)
		until (b.Position - torso.Position).magnitude <= 5
	else
		print("No Point B.")
	end

	end)
	

You see, the remote event is supposed to make the NPC Walk to Point A, and then Point B, but he won't. AGAIN, this NPC is pretty much the same as the other one! There is NOTHING different between the two, except for looks... Thank you!

7 comments

0

Put the script in the command section and open the output the check if there is any errors.

0

@Avia, hello. Okay, I did that, no errors.

0

Hmm Does it have any red colored text? Or is it just whitish

0

@Avia, nope, everything's normal. In output and script.

0

Hmm I actually don't know sorry :(

0

@Avia, Oops never mind, he just couldn't get to the pointB, due to the furniture in the way. Thanks so much for trying!

0

np

1 answer

Oops, never mind, he just couldn't get to the pointB, due to the furniture in the way. Thanks AviaFlyHigh for trying!

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