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: finding the local player

Previous Thread :: Next Thread 
123kevin123 is not online. 123kevin123
Joined: 02 Apr 2009
Total Posts: 1657
23 Sep 2014 05:30 PM
i got a interaction part that once you touch it, it does my event, now what i need help with is finding the player who touched this

thanks
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
23 Sep 2014 05:31 PM
part.Touched:connect(function(p)
if p.Parent:FindFirstChild("Humanoid") then
plr = game.Players:GetPlayerFromCharacter(p.Parent)
end
end)
Report Abuse
123kevin123 is not online. 123kevin123
Joined: 02 Apr 2009
Total Posts: 1657
23 Sep 2014 05:36 PM
thanks alot
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
23 Sep 2014 05:36 PM
your welcome ALOT
Report Abuse
123kevin123 is not online. 123kevin123
Joined: 02 Apr 2009
Total Posts: 1657
23 Sep 2014 06:40 PM
:)))
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
23 Sep 2014 06:49 PM
This is faster (albeit practically negligibly) and shorter to type out:

part.Touched:connect(function(p)
if p.Parent:FindFirstChild("Humanoid") then
plr = game.Players[p.Parent.Name]
end
end)
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
23 Sep 2014 07:02 PM
part.Touched:connect(function(p)
if not p.Parent:FindFirstChild("Humanoid") then return end
plr = game.Players[p.Parent.Name]
end)



4 lines #Rekt
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
23 Sep 2014 07:16 PM
119 characters vs. 130 characters. I win.
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
23 Sep 2014 07:20 PM
No fair


D=
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