Joriangames

Chatmessage w/ Touching Part SCRIPT

Jan 9th, 2024
1,990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. -- HOW TO MAKE a CHATMESSAGE by TOUCHING PART!!! TextChatService BY BLOXIANCODE youtube.com/c/BloxianCode
  2. -- Tutorial: https://youtu.be/GhlRcTCkbT8
  3. local name
  4. local cooldown = false
  5.  
  6. game.Workspace.touchPart.Touched:Connect(function(hit)
  7.     if hit.Parent:FindFirstChild("Humanoid") then
  8.         if cooldown == false then
  9.            
  10.             cooldown = true
  11.             name = hit.Parent.Name
  12.             game.ReplicatedStorage.chatEvent:FireAllClients(name)
  13.             wait(1)
  14.             cooldown = false
  15.            
  16.         end
  17.     end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment