-
What do you want to achieve? Keep it simple and clear!
When the user touches a part, the NPC is cloned, duplicated to the workspce, and is supposed to move theNODE1
-
What is the issue? Include screenshots / videos if possible!
The NPC DOESN’T move at all and no errors appear -
What solutions have you tried so far?
I’ve triedNODE1.Position
and justNODE1
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local part = script.Parent
local replicatedStorage = game:GetService("ReplicatedStorage")
local debouce = false
part.Touched:Connect(function(hit)
if debouce == false then
if hit.Parent:FindFirstChild("Humanoid") then
local npc = replicatedStorage:WaitForChild("NPC"):Clone()
npc.Parent = game.Workspace
local humanoid = npc:FindFirstChild("Humanoid")
humanoid:MoveTo(game.Workspace.NODE1.Position)
humanoid.MoveToFinished:Connect(function(hasReached)
print(hasReached)
end)
debouce = true
end
end
end)
Something to note is that if I use prints to print the touched part’s name and stuff the prints work so its not a script position statement in the hierarchy