How do i fix this bug?

Bug

I was tesing 0.4.0 of Be on a table or a computer! - Roblox, when i was tesing the teleporters and this happened!
robloxapp-20240211-1431011.wmv (567.9 KB)
Can anyone help me how do i fix this, it happens since these teleporters has been added to the game!

Script
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)

If theres any errors or problems, reply to me.

1 Like

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:

There’s nothing wrong now! Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.