|
| 20 Mar 2013 12:11 PM |
Can someone help?
I'm trying to make a script that get's a player's name and put's it in a "StringValue". The players name is the person who has clicked on certain dialog choices. But the problem is that it doesn't seem to work, so now I'm wondering is it even possible.?Here's what I've got (I'm almost certain that there should be a lot more lines):-
function pep (person) print(person) script.Parent.Person.Value=person print(person.Name) end script.Parent.Dialog.DialogChoiceSelected:connect(pep)
I thought (originally) that this would do as I know script like:-
function touch (hit) print(hit.Parent.Name)
end
script.Parent.Touched:connect(touch)
work, but the one I'm working hasn't got physical contact, is that why it won't work? Or if you could tell me where on ROBLOX wiki could help, that would be helpful too. |
|
|
| Report Abuse |
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 20 Mar 2013 12:13 PM |
| Change it so it's a LocalScript in PlayerGui, then you can use LocalPlayer.Name |
|
|
| Report Abuse |
|
|
| 20 Mar 2013 12:15 PM |
| Thanks I'll give that a shot. |
|
|
| Report Abuse |
|