here the code :
function onTouched(part)
if part.Parent:findFirstChild("Humanoid") ~= nil then
local msg = Instance.new("Message")
msg.Parent = game.Players:playerFromCharacter(part.Parent)
msg.Text = "Hello : " ..part.Parent.Name
wait(3)
msg:remove()
end
end
script.Parent.Touched:connect(onTouched) |