|
| 23 Nov 2017 07:40 PM |
hey guys! im trying to make a penguin follow you, and everything works except he sometimes gets in front of you and pushes you, and also the next problem:
i have a bodygyro and a bodyposition inside the pet(as well as the localscript im using) and the pet is always 90 degrees rotated from the player which is not what it should be, i want it facing it. this is my localscript
while true do local character = script.Parent.Parent wait() script.Parent.BodyPosition.Position = character['Left Leg'].Position - Vector3.new(5,0,1) script.Parent.BodyGyro.CFrame = character['Torso'].CFrame * CFrame.new(.5,0,-.5) end
Also, will this affect the pet getting in front of the player? Would it fix it? Thanks for any help :D |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2017 07:41 PM |
| btw the localscript is disabled and is enabled once inside the player |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 23 Nov 2017 07:43 PM |
| You should set the position to torso.CFrame*CFrame.new(-5,0,5) so that he is 5 studs behind and to the left of the player |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2017 07:45 PM |
| for the bodyPosition or the bodyGyro? |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 23 Nov 2017 07:48 PM |
The BodyPosition.
BodyPosition is strange, it won't go towards the position you identify linearly, it'll try to line up on one axis first, which is hilarious. Be careful with it, it might be worth exploring CFrame alternatives on RenderStepped. |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2017 07:56 PM |
Got an error LocalScript:16: bad argument #3 to 'Position' (Vector3 expected, got CFrame)
i got rid of the game.Workspace.Player stuff btw |
|
|
| Report Abuse |
|
|
|
| 23 Nov 2017 08:02 PM |
bump i rly need help w this
|
|
|
| Report Abuse |
|
|