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: suggestions needed

Previous Thread :: Next Thread 
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
14 Jan 2017 11:47 PM
anyone have any ideas on what i would use to go about making a part "look" at a player
Report Abuse
supremebloxboy is online. supremebloxboy
Joined: 12 Jun 2010
Total Posts: 424
15 Jan 2017 12:05 AM
Insta Look, No wait time, Instant:
part.CFrame = CFrame.new(part.Position, player.Position)
http://wiki.roblox.com/index.php?title=CFrame#Quick_Reference

or

Smooth Look, "Glides/Tweens" from One Position to the Other:
BodyGyro.CFrame = CFrame.new(part.Position, player.Position)
http://wiki.roblox.com/index.php?title=API:Class/BodyGyro#Example


Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:13 AM
yeah i forgot to put that i found out how, anyhow, do you know if table.concat organizes numbers from least to greatest?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
15 Jan 2017 12:14 AM
No it's in the same order the array is in
Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:25 AM
ok thanks, btw does anyone know how to fix the problem that happens whenever the player resets and the part is following them? it seems to break my script when someone falls off the map or resets
Report Abuse
Swordlust is not online. Swordlust
Joined: 05 Dec 2016
Total Posts: 476
15 Jan 2017 12:25 AM
CharacterAdded functions can fix that


Tips are always good | https://www.roblox.com/catalog/588125527/Tip
Report Abuse
lovesik is not online. lovesik
Joined: 10 Jul 2014
Total Posts: 194
15 Jan 2017 12:26 AM
LOL!


Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:27 AM
alright ill try that
Report Abuse
Swordlust is not online. Swordlust
Joined: 05 Dec 2016
Total Posts: 476
15 Jan 2017 12:29 AM
You could also just go into the StarterPlayer, and insert the script into startercharacter so everytime the player dies, it refreshes the character with the script.


Tips are always good | https://www.roblox.com/catalog/588125527/Tip
Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:30 AM
i mean wouldn't it bug out if every player had the script inside of them?
Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:32 AM
characteradded didn't really do anything, ill just add an if v.Character
Report Abuse
Swordlust is not online. Swordlust
Joined: 05 Dec 2016
Total Posts: 476
15 Jan 2017 12:32 AM
Having seperate scripts bug out if every player had the script inside their character? Doesn't sound like it would, after all tools don't bug out when every player has them inside of their character..


Tips are always good | https://www.roblox.com/catalog/588125527/Tip
Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:34 AM
wait, u mean like having the part face the local player? cause i need it to the face the closest player, that's why im using magnitude it seems to break whenever the player falls off the map, i fixed the reset problem
Report Abuse
Swordlust is not online. Swordlust
Joined: 05 Dec 2016
Total Posts: 476
15 Jan 2017 12:37 AM
If you're having trouble with magnitude and players, you might need to add an if statement comparing the players health + the magnitude. e.g

local part = Instance.new("Part")
part.Anchored = true
part.CFrame = CFrame.new(0,0,0)

if (part.Position - plr.Character.Torso.Position).magnitude < 5 and plr.Character.Humanoid.Health ~= 0 then print("All is good") end


Tips are always good | https://www.roblox.com/catalog/588125527/Tip
Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:39 AM
ill just add a waitforchild, but yeah if that doesn't work ill try ur way
Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
15 Jan 2017 12:40 AM
alright it worked, thanks!
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