zub74
|
  |
| Joined: 13 Sep 2008 |
| Total Posts: 489 |
|
|
| 25 Jul 2013 08:28 PM |
For example,
BadgeId = 115330646 game.Players.PlayerAdded:connect(function(p) if game:GetService("BadgeService"):UserHasBadge(p.userId, BadgeId) then Humanoid.Parent.Name = "Alpha Tester (Player)" end
But it doesn't work. It actually doesn't rename them at all. D:
But if it did, would I do Name= "Alpha Tester" Player, or what? |
|
|
| Report Abuse |
|
|
zub74
|
  |
| Joined: 13 Sep 2008 |
| Total Posts: 489 |
|
| |
|
|
| 25 Jul 2013 08:42 PM |
Lua doesn't have the ability to include variables directly in string literals. You have to concatenate [put strings together, e.g, "cat" and "dog" concatenated is "catdog"] (.. is the concatenation operator) to the literal the player's name, as some variable / property. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2013 08:45 PM |
("Alpha Tester $p"):gsub("$p", p.Name)
? |
|
|
| Report Abuse |
|
|
zub74
|
  |
| Joined: 13 Sep 2008 |
| Total Posts: 489 |
|
|
| 25 Jul 2013 08:56 PM |
For example,
a= (player's name) <--- not actual value..
print ("Alpha Tester" .. a)
Would print Alpha Tester Zub74, Derp, Nubscrub, etc? (Assuming the rest of the script was in place) |
|
|
| Report Abuse |
|
|
aboy5643
|
  |
| Joined: 08 Oct 2010 |
| Total Posts: 5458 |
|
|
| 25 Jul 2013 08:58 PM |
Don't put spaces in between.
"Alpha Tester"..a
Leave the periods touching the variable and the quotation marks. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2013 08:59 PM |
| ...why would you take out the spaces? That's a terrible suggestion. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2013 08:59 PM |
...unless its a number, in which you must never do that...
Why? |
|
|
| Report Abuse |
|
|
aboy5643
|
  |
| Joined: 08 Oct 2010 |
| Total Posts: 5458 |
|
|
| 25 Jul 2013 09:01 PM |
@Blue
I don't know what I'm doing anymore ._. Just ignore me... I'll be going back to the home now. |
|
|
| Report Abuse |
|
|