I got a script that I am tweaking but can't get it right. It is supposed to send a message if you touch a brick it ALL works except for the part at the end where it says wait(10). I want it not to show the message repeatedly if the character keeps on stepping on the part(door). Here is my script,
db = false
door = game.Workspace.Door
door.Touched:connect(function(hit)
if hit.Parent and game.Players:GetPlayerFromCharacter(hit.Parent)
then
db = true
p = game.Players:GetPlayerFromCharacter(hit.Parent)
m = Instance.new("Message", game.Workspace)
m.Text = p.Name.." has found the door."
wait(5)
m.Text:Destroy()
db = false
end
end)
wait(10)
