function onTouched(hit)
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil) then
script.Parent.BillboardGui.Frame.Visible = true
end
end
script.Parent.Touched:connect(onTouched)
function onTouchEnded(hit)
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil) then
script.Parent.BillboardGui.Frame.Visible = false
end
end
script.Parent.TouchEnded:connect(onTouchEnded)
|