lol123iloi

Proximity Prompt to talk

Jul 16th, 2021
3,047
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. --References
  2. local PartToDisplay = script.Parent
  3. local ProximityPrompt = script.Parent.ProximityPrompt--Find ProximityPrompt
  4. --Services
  5. local ChatService = game:GetService("Chat")
  6. --Variables
  7. local Debouce = false
  8. --Settings
  9. local Settings = {
  10.     DebouceTime = 1,
  11.     Message = "Hello and goodbye",
  12.     ColorOfText = Enum.ChatColor.White
  13. }
  14. --Script
  15. ProximityPrompt.Triggered:Connect(function()
  16.     if Debouce == false then
  17.         Debouce = true
  18.         ChatService:Chat(PartToDisplay,Settings.Message, Settings.ColorOfText)
  19.         wait(Settings.DebouceTime)
  20.         Debouce = false
  21.     end
  22. end)
Advertisement
Add Comment
Please, Sign In to add comment