of     1   

GrimstoneRPG
#32524361Thursday, August 26, 2010 3:02 AM GMT

Hi, I am trying to create an ImageLabel that checks the player's name, and gets his avatar thumbnail. This is what I have: script.Parent.Ava.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..p.Name if sub.string(1, 5, p.Name) == "Guest" then script.Parent.Ava.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=ROBLOX" end This is the output I am getting: Players.GrimstoneRPG.PlayerGui.rpgGUI.Script:13: bad argument #3 to 'sub' (number expected, got string) Any help would be appreciated.
motorstephen
#32524414Thursday, August 26, 2010 3:03 AM GMT

if string.sub(p.Name,1,5) == "Guest" then
TheNewArchitect
#32524416Thursday, August 26, 2010 3:03 AM GMT

string.sub(p.Name,1,5)
GrimstoneRPG
#32524499Thursday, August 26, 2010 3:05 AM GMT

Thank you, it worked.
crazypotato4
#32524819Thursday, August 26, 2010 3:11 AM GMT

i would actually do string.sub(p.Name,1,6) == "Guest " to avoid not showing people who have fake guest usernames, for example, if someone's name is Guest1337 because they're pretending to be guest.

    of     1