I need help with Vector3.FromNormalId()
. I need to make an object(pet) to walk in side of me(right) and I think I'd have to use Vector3.FromNormalId()
to do it. My code(which I forgot to save) was:
--of course it won't walk in side of me.-- local Pet = game.Workspace.Model local Player = game.Players.Player while wait() do Pet.Humanoid.WalkToPoint = Player.Torso.Position end
that was only I could've accepted, but It didn't walk in side of me, instead it walked in legs of mine, and I kinda kicked it so many times, and like that, that in real word, it would be dead meat. You also couldn't get its mood, 'cause the legs were infront of it. I made a Click Detector Gui that you can check its level, experience, hunger, thirst, mood and health. So the hidden face is kinda no problem. But otherwise it's very annoying.
Thanks,
SwaggyDuckie
Do what ContinentOfEurope said. But use it like this: His mistake is that he multiplied the NormalId with a Vector3 value instead of a float.
local Pet = game.Workspace.Model local Player = game.Players.Player local Distance = 5 --How many studs away from you while wait() do Pet.Humanoid:MoveTo(Player.Torso.Position + (Vector3.NormalId(Enum.NormalId.Right)*Distance)) --Use MoveTo. I made it on different lines so you can see what is happening. end
Hope it helps!
I've said it in chat a few times, you need to use vectorToWorldSpace
:
local Pet = game.Workspace.Model local Player = game.Players.Player local Distance = 3 while wait() do Pet.Humanoid.WalkToPoint = Player.Torso.CFrame:pointToWorldSpace(Vector3.NormalId(Enum.NormalId.Right)*Distance).p end