script.parent.GL.Touched:Connect(function(h)
local hum = h.Parent:FindFirstChild("Humanoid")
if hum ~= nil then
h.parent.HumanoidRootPart.CFrame = CFrame.new(workspace["TelElTo"].Position)
end
end)
script.parent.GR.Touched:Connect(function(h)
local hum = h.Parent:FindFirstChild("Humanoid")
if hum ~= nil then
h.parent.HumanoidRootPart.CFrame = CFrame.new(workspace["TelElTo"].Position)
end
end)
What i have to change in the script, when a player CLICKED and not touched the part that he will be teleported?

1 comment
You can learn more about ClickDetectors here: https://developer.roblox.com/en-us/api-reference/class/ClickDetector