Negriukas Posted August 2, 2014 Share Posted August 2, 2014 Hello, So i'm making my own nametags system and i need to draw the "_" in every player name with a space, like example if my name is "Franklin_Clinton" it will draw "Franklin Clinton" etc and thanks. This is a little part of my code detects = { { "_", " " }, } local playerName = getPlayerName(player) for k,v in ipairs (detects) do if string.find( string.lower ( playerName ),v[1]) then playerName = playerName:gsub ( playerName, v[2] ) end end The problem is that it repalce the whole player name with a space and it suppose to replace only the string "_" Link to comment
-.Paradox.- Posted August 2, 2014 Share Posted August 2, 2014 Try replacing this line playerName = playerName:gsub ( v[1], v[2] ) Link to comment
Negriukas Posted August 2, 2014 Author Share Posted August 2, 2014 Try replacing this line playerName = playerName:gsub ( v[1], v[2] ) Thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now