I’m trying to make a teleporter to a control room that just simply teleports you up there.
The player gets ragdolled when they are teleported to the control room. Attached is a video below. I checked devforum for any similar issues but have not really seen any.
local teleporter = script.Parent.Teleporter
local location = script.Parent.Location
local cooldown = true
teleporter.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("HumanoidRootPart") then
if cooldown == true then
hit.Parent.HumanoidRootPart.CFrame = location.CFrame + Vector3.new(0,2,0)
cooldown = false
wait(5)
cooldown = true
end
end
end)
location.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("HumanoidRootPart") then
if cooldown == true then
hit.Parent.HumanoidRootPart.CFrame = teleporter.CFrame + Vector3.new(0,2,0)
cooldown = false
wait(4)
cooldown = true
end
end
end)