Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with my messenger Gui?

Asked by
Damo999 182
10 years ago

i am trying to make it so when i type in a players name and i type my message in the answer box it displays that message to the person but i can't figure out how to get the answer portion to display what i want. look at where i have the dashes.


s = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui) f = Instance.new("Frame",s) f.Size = UDim2.new(0, 170,0, 170) f.Position = UDim2.new(0.8, 0,0, 0) f.BackgroundColor3 = Color3.new(1,0,0) start = Instance.new("TextButton",s) start.Size = UDim2.new(0, 100,0, 40) start.Position = UDim2.new(.84, 0,0.44, 0) start.BackgroundColor3 = Color3.new(0,1,0) start.Font = "Arial" start.Text = "Send" start.FontSize = "Size24" pname2 = Instance.new("TextBox",s) pname2.Size = UDim2.new(0, 150,0, 30) pname2.Position = UDim2.new(.81, 0,0.32, 0) pname2.BackgroundColor3 = Color3.new(1,1,1) pname2.Font = "Arial" pname2.Text = pname2.Text pname2.FontSize = "Size24" pname = Instance.new("TextBox",s) pname.Size = UDim2.new(0, 150,0, 30) pname.Position = UDim2.new(.81, 0,0.2, 0) pname.BackgroundColor3 = Color3.new(1,1,1) pname.Font = "Arial" pname.Text = "Enter Name" pname.FontSize = "Size24" answer = Instance.new("TextLabel",s) answer.Size = UDim2.new(0, 150,0, 30) answer.Position = UDim2.new(.81, 0,0, 0) answer.BackgroundTransparency = 1 answer.FontSize = "Size18" answer.Font = "ArialBold" answer.Text = -- i can't figure this out i want it to display what i typed in the answer boxnot sure what to put answer.TextColor3 = Color3.new(1,1,1) start.MouseButton1Down:connect(function() for i,player in pairs(game.Players:GetChildren()) do if player.Name == pname.Text then m = Instance.new("Message",Workspace) m.Text = answer.Text -- confused please help if you can wait(5) m:Remove() end end end)

Answer this question