of     1   

gamert7
#95379989Saturday, April 20, 2013 7:25 AM GMT

code: if Msg:sub(1, 3) == "#pm" then local player = Msg:sub(4) then w = game.Players:FindFirstChild(player) if w then screen = Instance.new("ScreenGui", player.PlayerGui) screen.Name = "PM" text = Instance.new("TexetLabel", screen) text.Size = UDim2.new(0, 1200, 0, 30) text.Name = "Messege" text.Font = "ArialBold" text.FontSize="Size24" text.Position = UDim2.new(0, 200, 0, 20) text.TextColor3 =(255, 255, 255) text.Text="[Private Message]"..Player.Name.." :" end end --I want to know how I can get the text from the message after the players name.
OldGoldie
#95383043Saturday, April 20, 2013 8:55 AM GMT

Maybe use string.match?
gamert7
#95383433Saturday, April 20, 2013 9:09 AM GMT

I suppose but, I still would need a way to get rid of the name written in the message as is. As I would run into the same problem....
gamert7
#95383883Saturday, April 20, 2013 9:25 AM GMT

I can not test this exactly but, maybe this would work? if Msg:sub(1, 3) == "#pm" then local player = Msg:sub(4) then w = game.Players:FindFirstChild(player) if w then screen = Instance.new("ScreenGui", player.PlayerGui) screen.Name = "PM" text = Instance.new("TexetLabel", screen) text.Size = UDim2.new(0, 1200, 0, 30) text.Name = "Messege" text.Font = "ArialBold" text.FontSize="Size24" text.Position = UDim2.new(0, 200, 0, 20) text.TextColor3 =(255, 255, 255) local message = Msg:string.find(:) text.Text="[Private Message]"..Player.Name.."" ..message.." " --That would return the rest of the message? end end
gamert7
#95417296Saturday, April 20, 2013 5:55 PM GMT

bump.
ball360
#95417701Saturday, April 20, 2013 5:58 PM GMT

May I see an example of a #pm command you are trying to implement?
gamert7
#95418643Saturday, April 20, 2013 6:07 PM GMT

Well like from another script or a example of using it?
ball360
#95418900Saturday, April 20, 2013 6:09 PM GMT

Do you use it as: "#pm player message" ?
notsopwnedg
#95418933Saturday, April 20, 2013 6:09 PM GMT

xP this should work. local Check = Msg:match("^%W+%w+") if Check == "#pm" then local Rest = Msg:sub(Check:len()+2) local Name = Rest:match(".-%w+") --local Player = Game.Players:FindFirstChild(Name) Player = true if Player then local Message = Rest:sub(Name:len()+2) screen = Instance.new("ScreenGui", player.PlayerGui) screen.Name = "PM" text = Instance.new("TexetLabel", screen) text.Size = UDim2.new(0.3,0,0.3,0) text.Name = "Messege" text.Font = "ArialBold" text.FontSize="Size24" text.Position = UDim2.new(0.2,0,0.2,0) text.TextColor3 = Color3.new(255/255,255/255,255/255) text.Text = Message Game.Debris:AddItem(screen,5) end end
gamert7
#95423290Saturday, April 20, 2013 6:50 PM GMT

I wanted to know how to do it i didn't want it handed to me because, that way I learn nothing....
Notunknown99
#95423830Saturday, April 20, 2013 6:55 PM GMT

gmatch, I think. %w+
gamert7
#95427028Saturday, April 20, 2013 7:25 PM GMT

Didn't change anything.
gamert7
#95427962Saturday, April 20, 2013 7:33 PM GMT

Bump.
gamert7
#95428559Saturday, April 20, 2013 7:38 PM GMT

Bump.
gamert7
#95430271Saturday, April 20, 2013 7:54 PM GMT

[1] bump.
gamert7
#95436782Saturday, April 20, 2013 8:57 PM GMT

[2] Bump/
gamert7
#95438222Saturday, April 20, 2013 9:12 PM GMT

[3] bump/
gamert7
#95439370Saturday, April 20, 2013 9:25 PM GMT

bumpd

    of     1