generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: .Chatted

Previous Thread :: Next Thread 
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
12 Apr 2015 11:04 AM
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
local tl = Instance.new('TextLabel',game.StarterGui.ChatGui)
tl.TextColor3 = Color3.new(255/255,255/255,255/255)
tl.Position = UDim2.new(.2,0,.2,0)
tl.BackgroundTransparency = 1
tl.Text = p.Name..' Said: '..msg
wait(10)
tl:remove()
end)
end)

Why isnt this working?
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
12 Apr 2015 11:05 AM
Wunt mine?
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
12 Apr 2015 11:05 AM
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
local tl = Instance.new('TextLabel',p.PlayerGui.ChatGui)
tl.TextColor3 = Color3.new(255/255,255/255,255/255)
tl.Position = UDim2.new(.2,0,.2,0)
tl.BackgroundTransparency = 1
tl.Text = p.Name..' Said: '..msg
wait(10)
tl:remove()
end)
end)
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
12 Apr 2015 11:08 AM
Yes please crescent, so that I may learn.
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
12 Apr 2015 11:23 AM
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
local tl = Instance.new('TextLabel',p.PlayerGui.ChatGui)
tl.TextColor3 = Color3.new(255/255,255/255,255/255)
tl.Position = UDim2.new(.2,0,.15,0)
tl.Size = UDim2.new(0,0,0,0)
tl.BackgroundTransparency = 1
tl.FontSize = Enum.FontSize.Size12
tl.Text = p.Name..': '..msg
wait(10)
tl:remove()
end)
end)

Ok, so I now have this, it works. I have two questions, however.
1. How do I prevent text overlapping?
2. How do I make it visible to all players?

Thank you.
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
12 Apr 2015 11:27 AM
make an ipdate function and everytime someone talks it updates everyones gui
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
12 Apr 2015 11:28 AM
Yes but idk how
Example?
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
12 Apr 2015 11:29 AM
Not on pc qq
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
12 Apr 2015 11:36 AM
game.Players.PlayerAdded:connect(function(p)
p.Chatted:connect(function(msg)
local tl = Instance.new('TextLabel',p.PlayerGui.ChatGui)
local function update()
if p.PlayerGui.ChatGui.BoolValue.Value == true then
tl.Position = tl.Position + UDim2.new(0,0,0,26)
end
end
Instance.new('BoolValue',p.PlayerGui.ChatGui).Value = true
tl.TextColor3 = Color3.new(255/255,255/255,255/255)
tl.Position = UDim2.new(.2,0,.15,0)
tl.Size = UDim2.new(0,0,0,0)
tl.BackgroundTransparency = 1
tl.FontSize = Enum.FontSize.Size12
tl.Text = p.Name..': '..msg
wait(10)
tl:remove()
while wait() do
update()
end
end)
end)


Ok, so I ended up with this. Doesn't work, same thing. Not sure..
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
12 Apr 2015 11:47 AM
b1
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
12 Apr 2015 11:57 AM
b2
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
12 Apr 2015 02:33 PM
function update(plr)
wait()
plr.PlayerGui.Leaderboard.Ok.Obj.Value = nil
for i,vt in pairs(plr.PlayerGui.Leaderboard.Ok:GetChildren()) do if vt.Name ~= "Obj" then vt:Destroy() end end
for i,v in pairs(game.Players:GetChildren()) do
local fr =Instance.new("Frame",plr.PlayerGui.Leaderboard.Ok)
fr.ZIndex = 10
local tb = Instance.new("TextButton",fr)
tb.ZIndex = 10
local tb2 = Instance.new("TextButton",fr)
tb2.ZIndex = 10
fr.Size = UDim2.new(1,0,0,30)
fr.BackgroundColor3 = Color3.new(170/255, 170/255, 127/255)
fr.BackgroundTransparency = .4
if plr.PlayerGui.Leaderboard.Ok.Obj.Value ~= nil then
if not pcall(function() fr.Position = plr.PlayerGui.Leaderboard.Ok.Obj.Value.Position + UDim2.new(0,0,0,33)
if #plr.PlayerGui.Leaderboard.Ok:GetChildren() >= 7 then
plr.PlayerGui.Leaderboard.Ok.CanvasSize = plr.PlayerGui.Leaderboard.Ok.CanvasSize + UDim2.new(0,0,0,23)
plr.PlayerGui.Leaderboard.Ok.ScrollingEnabled = true
end end) then else end
else
fr.Position = UDim2.new(0,0,0,0)
end
fr.ClipsDescendants = true
tb.Size = UDim2.new(.2,0,0,30)
tb.Position = UDim2.new(0,0,0,0)
tb.BackgroundTransparency = 1
tb.Font = "ArialBold"
tb.FontSize = "Size18"
tb.TextColor3 = Color3.new(0, 0, 0)
tb.Text = "0"
tb2.Size = UDim2.new(.7,15,0,30)
tb2.Position = UDim2.new(.2,0,0,0)
tb2.BackgroundTransparency = 1
tb2.Font = "ArialBold"
tb2.FontSize = "Size18"
tb2.TextColor3 = Color3.new(0/255, 0/255, 0/255)
tb2.Text = v.Name
plr.PlayerGui.Leaderboard.Ok.Obj.Value = fr
end
end

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function()
for i,vr in pairs(game.Players:GetChildren()) do
update(vr)
end
end)
end)

last = #game.Players:GetChildren()
w = coroutine.wrap(function()
while wait() do
if #game.Players:GetChildren() ~= last then
last = #game.Players:GetChildren()
for i,vr in pairs(game.Players:GetChildren()) do
update(vr)
end
end
end
end)

w()
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image