local TeleportPart1 = script.Parent.Part1
local TeleportPart2 = script.Parent.Part2
TeleportPart1.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
if w then
w.CFrame = TeleportPart2.CFrame + Vector3.new(0, 5, 0)
TeleportPart2.CanTouch = false
wait(1)
TeleportPart2.CanTouch = true
end
end)
TeleportPart2.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
if w then
w.CFrame = TeleportPart1.CFrame + Vector3.new(0, 5, 0)
TeleportPart1.CanTouch = false
wait(1)
TeleportPart1.CanTouch = true
end
end)
Can anyone help me fix this? All of the teleporters name was correct!
I wouldn’t really recommend using CFrame. I’d rather use position, because CFrame can change It’s rotation to the teleport part.
local TeleportPart1 = script.Parent.Part1
local TeleportPart2 = script.Parent.Part2
TeleportPart1.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
if w then
w.Position= TeleportPart2.Position+ Vector3.new(0, 5, 0)
TeleportPart2.CanTouch = false
wait(1)
TeleportPart2.CanTouch = true
end
end)
TeleportPart2.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
if w then
w.Position= TeleportPart1.Position+ Vector3.new(0, 5, 0)
TeleportPart1.CanTouch = false
wait(1)
TeleportPart1.CanTouch = true
end
end)
well, i had the same glitch years ago, this is how i fixed:
put this in a local script
local stateType = Enum.HumanoidStateType
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
humanoid:SetStateEnabled(stateType.FallingDown, false)
humanoid:SetStateEnabled(stateType.Ragdoll, false)
pratically it disable the actions to make the player ragdoll, if you wanna know more about (like to make double jump) then here’s the page: