Need help making button teleport

local clickDetector = script.Parent
local button = clickDetector.Parent
local seat = game.Workspace["Receptionist Seat 1"]

seat:GetPropertyChangedSignal("Occupant"):Connect(function()
    if seat.Occupant then
        local Character = seat.Occupant.Parent

        clickDetector.MouseButton1Up:Connect(function()
            Character:WaitForChild("Humanoid").Health = 0
        end)
    end
end)

Line 5 is problem it says

What are you trying to achieve with this script?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.