So I have this teleport door made by my friend and I edited it to teleport on click but idk whats wrong with it
script.Parent.MouseClick:Connect(function(start)
local human = hit.Parent:findFirstChild("Torso")
brick = script.Parent
if (human ~=nil) then
human.CFrame= CFrame.new(Vector3.new(-204.75, 1.04, -15.16))
script.Parent.Touched:connect(onTouched)
end)
anyone see what's wrong with it?
