bruh im tryna make a move that teleports me to where im looking the teleport is working and everything but the after image clone of my character is spawning inside me instead of where i just was before the teleportation anyone know why? i put my server script where the teleport logic happens as the pic theres no errors so this has to be logic issues ```lua
--i removed unnessecary functions to post this
local function VFX(Position, root)
local FloorVfx = RepStore.FX.flooremitdash:Clone()
FloorVfx.Position = root.Position + Vector3.new(0, -3, 0)
FloorVfx.Parent = workspace
FloorVfx.Attachment.DashFloor:Emit(5)
Debris:AddItem(FloorVfx, 1.5)
end
local function CreateClone(root)
local character = root and root.Parent
if not character then return end
for _, part in pairs(character:GetChildren()) do
if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
local AfterImage = part:Clone()
AfterImage.Transparency = 1
AfterImage.Anchored = true
AfterImage.CanCollide = false
AfterImage.CFrame = part.CFrame
AfterImage.Parent = workspace
Debris:AddItem(AfterImage, 0.5)
TweenService:Create(AfterImage, TweenInfo.new(1), { Transparency = 0 }):Play()
end
end
end
TeleFxEvent.OnClientEvent:Connect(function(HitPosition,root)
CreateClone(root)
VFX(position, root)
end)