I’m having trouble figuring out how to fix the fling after you teleport a player, I also made sure to anchor all the parts and spaced out the teleporter to make sure it doesn’t fling the player.
local gameFolder = workspace:WaitForChild("GameFolder")
local events = game.ReplicatedStorage.Events
--// Door Teleport
local Doors = {
{
Name = "Rooftop Entrance",
Door = gameFolder.TpDoors.RoofEntrance.Base,
Destination = gameFolder.TpDoors.RoofExit.Tp
},
{
Name = "Rooftop Exit",
Door = gameFolder.TpDoors.RoofExit.Base,
Destination = gameFolder.TpDoors.RoofEntrance.Tp
},
}
local function setupDoor(doorData)
local prompt = doorData.Door:WaitForChild("ProximityPrompt")
local destination = doorData.Destination
prompt.Triggered:Connect(function(player)
local character = player.Character
if not character then return end
local root = character:FindFirstChild("HumanoidRootPart")
if not root then return end
-- Teleport first
root.CFrame = destination.CFrame
-- Reset all velocities
for _, part in ipairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.AssemblyLinearVelocity = Vector3.zero
part.AssemblyAngularVelocity = Vector3.zero
end
end
-- Fire client event for teleport effects (particles, fade, etc.)
events.teleportEvent:FireClient(player)
end)
end
for _, door in ipairs(Doors) do
setupDoor(door)
end
I’ve also set the linear and angular velocity to 0 to prevent the player from getting flinged, but the issue still persist. This never happened in any other of the games I’ve made, only this game alone has this issue.
Is there some settings that I’m missing or there something wrong with the code?
