well here ya go,right from my place the blender script!:
local debounce = false
function getPlayer(humanoid)
-- find the owning player of a humanoid.
local players = game.Players:children()
for i = 1, #players do
if players[i].Character ~= nil then
if players[i].Character.Humanoid == humanoid then return players[i] end
end
end
return nil
end
function displayMsg(humanoid)
local torso = humanoid.Parent.Torso
local player = getPlayer(humanoid)
if player ~= nil then
local message = Instance.new("Message")
message.Text = "gr8 now i have to clean up.................."
message.Parent = player
humanoid.Health = 0
wait(15)
message.Parent = nil
end
end
function onTouched(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")
if humanoid~=nil and debounce == false then
debounce = true
displayMsg(humanoid)
debounce = false
end
end
script.Parent.Touched:connect(onTouched) |