Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Making a NPC move locally..?

Asked by 5 years ago
Edited 5 years ago

So I've tried over and over with many different methods and scripts and this is what I've got now

local npc = game.Workspace["NPC1"]
c =  CFrame.new(-56.415, 12.6, 44.465) * CFrame.Angles(4, 5, 6)
npc.Humanoid:MoveTo(c.p)
npc.Humanoid.MoveToFinished:wait() --ik
npc:SetPrimaryPartCFrame(c)

I have another script which, once you press a button on the gui, it will move this to Workspace.CurrentCamera as I thought that was local only and that didn't work (This script is a local script btw).

I've also tried to spawn in the NPC locally which just became laggy.

Any help would be appreciated.

btw what this script is meant to do is, once you click a button on the playergui that will pop up once you have entered a certain area, The NPC will move to the location then it would move back. However, I only want the player that clicked the button to see the NPC move.

0
Just have it as a function in the local script where you're checking when the button's pressed...? User#22604 1 — 5y
0
oOoOo, That sounds like a good idea! I'll try that out now, Thanks! JackThePro202 -2 — 5y
0
@gewehrreben Didn't work, Darn! JackThePro202 -2 — 5y

Answer this question