I tinkered around with he script but everything still doesn't work
Here's the code
local CD = script.Parent
local block = script.Parent.Parent
local function OnClicked()
local Teleport = "Lentilkac58-Easy-Teleport-2"
local function Touch(hit)
if script.Parent.Locked == false and script.Parent.Parent:FindFirstChild(Teleport).Locked == false then
script.Parent.Locked = true
script.Parent.Parent:FindFirstChild(Teleport).Locked = true --Checks Debounce.
local Pos = script.Parent.Parent:findFirstChild(Teleport)
hit.Parent:MoveTo(Pos.Position)
wait(1)
script.Parent.Locked = false
script.Parent.Parent:FindFirstChild(Teleport).Locked = false
end
end
script.Parent.Touched:connect(Touch)
end
CD.MouseClick:Connect(OnClicked)
here's the line it says is wrong:
(It wont work ON CLICK)
script.Parent.Touched:connect(Touch)

1 comment
youre creating a new touch event everytime you call the click event which means every time you click on the click detector, it creates a new touch event along with the other ones you created when you clicked the click detector before. i'd break up ur code and see if the click function works by printing out something.