Hello, I’m making a script where when you touch a part a message shows up. But when you press it, it spams the gui message.
Code:
local Players = game:GetService("Players")
local part = script.Parent
local function onTouched(part)
local player = Players:GetPlayerFromCharacter(part.Parent)
if not player then return end
print(player.Name)
end
part.Touched:Connect(onTouched)
Any help is appreciated, I just need to know how to make a GUI pop up ONCE and maybe a debounce when you touch the part.