Advertisement
ClockworkHorror

Chat Above Head Test

Jul 2nd, 2015
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. messageTime = 3 --You can change this so that the message will stay up longer. Right now, it will stay for 3 seconds.
  2.  
  3. function onChatted(msg, recipient, speaker)
  4.  
  5. if speaker.Character ~= nil then
  6. speaker.Character.Name = msg
  7. wait(messageTime)
  8. speaker.Character.Name = speaker.Name
  9. end
  10.  
  11. end
  12.  
  13. function onPlayerEntered(newPlayer)
  14. newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
  15. end
  16.  
  17. game.Players.ChildAdded:connect(onPlayerEntered)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement