Hello developers , today I tried to make a teleportation with the player to another player and somehow I succeeded, however there were many bugs and delays like this:
https://gyazo.com/3a88cc54e473acd635404402fe237243
Another problem that occurs is that when the player collides with a player, it looks like he is going crazy.
Is there any way to make an accurate bodyposition? I would appreciate your support. I use translator by the way
Script:
local Ufff = coroutine.wrap(function()
wait(0.4)
local BodyPosition = Instance.new("BodyPosition");
BodyPosition.Parent = data.Character.HumanoidRootPart
BodyPosition.Position = data.Character.HumanoidRootPart.Position + Vector3.new(0,30,0)
BodyPosition.MaxForce = Vector3.new(50000,50000,50000)
BodyPosition.D = 100
game:GetService("Debris"):AddItem(BodyPosition,0.85)
end)
Ufff();
local BodyPositionTarget = Instance.new("BodyPosition");
BodyPositionTarget.Position = data.Target.HumanoidRootPart.Position + Vector3.new(0,30,0)
BodyPositionTarget.P = 9000
BodyPositionTarget.MaxForce = Vector3.new(999999,999999,999999)
BodyPositionTarget.D = 1000
BodyPositionTarget.Parent = data.Target.HumanoidRootPart