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 » Scripting Helpers
Home Search
 

Re: Dialogs -- Player?

Previous Thread :: Next Thread 
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 06:35 PM
Ummm. I might need a little more common sense, though how exactly would I find the player through the selection of a dialog choice? I don't think object browser is of much use to this.
Report Abuse
RoboTestGear is not online. RoboTestGear
Joined: 28 Dec 2009
Total Posts: 3063
06 Feb 2013 06:37 PM
UserDialog I believe is what you're looking for, I am not sure tho. You could always use magnitude.
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 06:38 PM
I really don't know how to use magnitude. Not fond of advanced scripting :/
Report Abuse
RoboTestGear is not online. RoboTestGear
Joined: 28 Dec 2009
Total Posts: 3063
06 Feb 2013 06:40 PM


Part1 = game.Workspace.Part1
Part2 = game.Workspace.Part2
Distance = (Part1.Position - Part2.Position).magnitude

print(Distance)
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 06:42 PM
Sorry if I'm being stupid. But what does that have to do with finding the player?
Report Abuse
RoboTestGear is not online. RoboTestGear
Joined: 28 Dec 2009
Total Posts: 3063
06 Feb 2013 06:44 PM

function GetPlayer(Dis)
local Players = game.Players:GetChildren()
for i=1,#Players do
Character = Players[i].Character
if Character then
Character:findFirstChild("Torso")
if Torso then
if (Torso.Position - script.Parent.Position).magnitude < Dis then
return Players[i]
end
end
end
end
return nil
end


print(GetPlayer(30))
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 06:49 PM
I see where your coming from. But it might turn out to be little bit glitchy, and not user friendly.
Report Abuse
RoboTestGear is not online. RoboTestGear
Joined: 28 Dec 2009
Total Posts: 3063
06 Feb 2013 06:51 PM
UserDialog
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 06:54 PM
Of course. Thank you for slamming common sense right back into my head.
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 06:59 PM
Alright. I declare my stupidity among the advanced scripters. You're gonna have to baby me through this. Hows exactly would I use UserDialog in a line of script?
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 07:04 PM
Or well, use it to find the player...
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
06 Feb 2013 07:19 PM
This might answer your questions:
http://wiki.roblox.com/index.php/How_to_use_dialog

~ I be trollin ~
Report Abuse
noobkiller878 is not online. noobkiller878
Joined: 22 Dec 2008
Total Posts: 1465
06 Feb 2013 07:24 PM
Wiki strikes again. Thank you.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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