Hi! i have made a script which detects if a tool has touched a part, However, after a couple scans. The part no longer changes the text. Any work around for this? Any help is great, thanks in advance! Script:
local db = false
script.Parent.Touched:Connect(function(hit)
if not db then
db = true
local h = hit.Parent.Name
if h == "milk" then
script.Parent.Parent.screen.SurfaceGui.Frame.TextLabel.Text = "Error, cannot purchase. Try again."
wait(5)
script.Parent.Parent.screen.SurfaceGui.Frame.TextLabel.Text = "Scan item >"
db = false
end
end
end)
