generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: help pls

Previous Thread :: Next Thread 
Demolite_STM is not online. Demolite_STM
Joined: 03 Feb 2017
Total Posts: 77
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
Demolite_STM is not online. Demolite_STM
Joined: 03 Feb 2017
Total Posts: 77
23 Nov 2017 07:41 PM
btw the localscript is disabled and is enabled once inside the player
Report Abuse
Soybeen is not online. 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
Demolite_STM is not online. Demolite_STM
Joined: 03 Feb 2017
Total Posts: 77
23 Nov 2017 07:45 PM
for the bodyPosition or the bodyGyro?
Report Abuse
Soybeen is not online. 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
Demolite_STM is not online. Demolite_STM
Joined: 03 Feb 2017
Total Posts: 77
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
Demolite_STM is not online. Demolite_STM
Joined: 03 Feb 2017
Total Posts: 77
23 Nov 2017 08:02 PM
bump i rly need help w this
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image