#Cframe isn't being updated

1 messages · Page 1 of 1 (latest)

harsh marsh
#
local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvents"):WaitForChild("RappelEvent")
local part = game:GetService("Workspace"):WaitForChild("RappelPart")

event.OnServerEvent:Connect(function(player)
    local character = player.Character or player.CharacterAdded:Wait()
    if not character then return end

    local rootpart = character:FindFirstChild("HumanoidRootPart")
    if not rootpart then
        print("no root found in character")
    end

    local newpos = part.CFrame * CFrame.new(0, 0, -1.5)

    rootpart.CFrame = newpos
end)

idk why the character isn't being teleported to 1.5 studs ahead of the part position