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

Either I don't understand :PivotTo() correctly or something's wrong..?

Asked by 3 years ago

function SpawnZombie(name,position) Zombie = game.ReplicatedStorage.Enemies[name]:Clone() Zombie.Parent = game.Workspace Zombie:GetPivot() Zombie:PivotTo(position) end global function set up so I can conveniently use later. ^

SpawnZombie("Zombie",CFrame.new(90, 50, -484)) Take a zombie out and put it somewhere else away from its original position. However, what actually happens, is that the Zombie is actually taken somewhere else 100 studs away from the intended position. I need a little help with this.

0
SOLVED! After a lot messing around, I've found that I needed to assign a primarypart to my model! Which I picked "Torso". I thought I read somewhere that HumanoidRootPart would be picked as the default option if no primarypart is found? HuyVietNam 0 — 3y

Answer this question