I’m making a move that lets you teleport behind a person and deal damage to them but I am facing a weird issue that I cant figure out how to fix…
When I teleport the player behind the character being hit, I teleport normally on the client but when I switch to the server view I’m suddenly under the map for no apparent reason, everything is handled on the server and I’m using the new :PivotTo and the :GetPivot functions so I’m not sure as to why this is happening
Client:
Server:
Video:
Teleport Code:
-->> This function is fired via server script inside the character that detects inputs
module.M2 = function()
-- Sanity checks
-- Teleport Part >
local length = 3
local taggedPivot = taggedplr:GetPivot()
character:PivotTo(taggedPivot - (taggedPivot.LookVector * length))
end
Solutions I’ve tried so far:
- Teleporting on the client
- Changing the network owner to the server before teleporting and setting back to the player
- Opting for AlignPos instead of BodyPosition
- Anchoring the humanoid root part and unanchoring after 1 frame of teleporting
It’s important to note that this issue only happens after I teleport whilst having an AlignPos inside my character