|
| 25 Dec 2016 08:53 PM |
I couldn't find a way to do this, Any wiki links, ect. Lets say the player name is "hi" how would I find if hi touched it so I can print ("hi touched this block") when hi touches it
"Got my cup of Coffee" |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2016 08:57 PM |
bump :)
"Got my cup of Coffee" |
|
|
| Report Abuse |
|
|
Quasar99
|
  |
| Joined: 21 Nov 2009 |
| Total Posts: 9328 |
|
|
| 25 Dec 2016 08:58 PM |
assuming the script is in the part
script.Parent.Touched:connect(function(player) print(player.Name .. " touched this block") end) |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 25 Dec 2016 08:59 PM |
left leg touched this block!
returns the part not the player |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2016 08:59 PM |
I was asking for a specific player to have to touch it so it prints. Not a random one. Sorry for the misunderstanding
"Got my cup of Coffee" |
|
|
| Report Abuse |
|
|
Quasar99
|
  |
| Joined: 21 Nov 2009 |
| Total Posts: 9328 |
|
|
| 25 Dec 2016 09:00 PM |
whoops
script.Parent.Touched:connect(function(player) print(player.Parent.1Name .. " touched this block") end) |
|
|
| Report Abuse |
|
|
Quasar99
|
  |
| Joined: 21 Nov 2009 |
| Total Posts: 9328 |
|
|
| 25 Dec 2016 09:00 PM |
| that doesnt really work either but it at least prints the player name |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 25 Dec 2016 09:05 PM |
local part = script.Parent
part.Touched:connect(function(hit) local char = hit.Parent if game.Players:GetPlayerFromCharacter(char) then if char.Name == "bob" then print("bob touched me") end end end) |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2016 09:06 PM |
@amanda that really helps ill try to learn off that <3
"Got my cup of Coffee" |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2016 09:23 PM |
@amanda
"bob touched me" that sounds wrong
sorry for my dirty mind
|
|
|
| Report Abuse |
|
|