:SetPrimaryPartCFrame only teleporting object for a frame

I’m trying to make a hand appear behind a player using “:SetPrimaryPartCframe” but for some reason it only teleports the hand for a split second and then it teleports the hand back

Hand2.HamdBase.Anchored = true
			Hand2.PrimaryPart = Hand2.HamdBase
			Hand2:SetPrimaryPartCFrame(hit.Parent:GetPrimaryPartCFrame()*CFrame.new(0, 0, 2))

Would using :PivotTo() fix your issue?

What’s that? Is a problem the script you need to have to fix it.


-- Replace 'PartToTeleport' with the name of your Part or Model
local part = game.Workspace.PartToTeleport

-- Replace these coordinates with your desired teleport destination
local destination = Vector3.new(10, 5, 15)

-- Function to teleport the part to the destination
local function teleportObject()
    -- Calculate the new CFrame for the part
    local newCFrame = CFrame.new(destination)

    -- Set the PrimaryPart's CFrame to the new CFrame
    part:SetPrimaryPartCFrame(newCFrame)

    -- Disconnect the function after one frame to avoid continuous teleportation
    disconnectHandle:Disconnect()
end

-- Connect teleportObject function to RunService.Stepped event
local disconnectHandle
disconnectHandle = game:GetService("RunService").Stepped:Connect(function()
    teleportObject()
end)

i found a solution:

hand2.Base = hit.Parent:GetPrimaryPartCFrame()*CFrame.new(0, 0, 2)

(all children of hand2 are connected to hand2.Base. And hand2.Base is also the primary part of Hand2)

Well done, nice work It’s we should fix it now it’s got fixed

i agree with whatever this means

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