Everytime I touch the part it's supposed to make my player say something, the saying something thing works but it doesn't stop so I tried making it so once h == 9 then it stops repeating. I know it has to do with something having a loop inside of something. Can someone help? Here's the problematic code
part.Touched:Connect(function(touch)
if touch.Parent == player.Character then
repeat
h -= 1
ChatService:Chat(player.Character, "hi",Enum.ChatColor.White)
until h == 9
end
end)

1 comment
Like JB_SuperGamer, you're quite literally spamming the Chat without any delay, and also depends how high you set
hto be