#Help with the look direction

1 messages · Page 1 of 1 (latest)

unkempt ridge
#

im trying to make the player look in the front direction like the white cube but its not working

#

im a new scripter

local deathPart = workspace:WaitForChild("Death")

script.Parent.Touched:Connect(function(hit)
local character = hit.Parent
if character then
local hrp = character:FindFirstChild("HumanoidRootPart")
local player = game.Players:GetPlayerFromCharacter(character)
if hrp and player then
-- Teleport player to Death part, facing world front (Z negative)
hrp.CFrame = CFrame.new(deathPart.Position, deathPart.Position + Vector3.new(0, 0, 1))

        print(player.Name .. " teleported to Death part facing front")
    end
end

end)

#

--its not facing the proper direction

kind ibex
#

show what happens

unkempt ridge
#

it faces the direction

#

i face

#

doesnt change look dir

#

and

#

i want it to face front from that white cube

unkempt ridge
kind ibex
#

like a screenshot or a video

unkempt ridge
kind ibex
unkempt ridge
#

k

#

imma record wait

unkempt ridge
kind ibex
#

i'll take a look in a bit

unkempt ridge
#

k

atomic ravineBOT
#

studio** You are now Level 2! **studio

kind ibex
#
hrp.CFrame = CFrame.new(deathPart.Position)
hrp.CFrame = CFrame.new(deathPart.Position, deathPart.Position + Vector3.new(0, 0, 1))

try this

unkempt ridge
#

can u give me the full code

#

where to replace

kind ibex
#

replace just that line with the stuff i sent

unkempt ridge
#

k

unkempt ridge
#

@kind ibex still not workin

kind ibex
#

strange

unkempt ridge
#

i didnt use any remoteEvents or Functions

#
local deathPart = workspace:WaitForChild("Death")

script.Parent.Touched:Connect(function(hit)
    local character = hit.Parent
    if character then
        local hrp = character:FindFirstChild("HumanoidRootPart")
        local player = game.Players:GetPlayerFromCharacter(character)
        if hrp and player then
            -- Teleport player to Death part, facing world front (Z negative)
            hrp.CFrame = CFrame.new(deathPart.Position)
            hrp.CFrame = CFrame.new(deathPart.Position, deathPart.Position + Vector3.new(0, 0, 1))

            print(player.Name .. " teleported to Death part facing front")
        end
    end
end)
unkempt ridge
kind ibex
#

no, i don't have any ideas

unkempt ridge
#

i think we need help

#

would this work

#
local deathPart = workspace:WaitForChild("Death")

script.Parent.Touched:Connect(function(hit)
    local character = hit.Parent
    if character then
        local hrp = character:FindFirstChild("HumanoidRootPart")
        local player = game.Players:GetPlayerFromCharacter(character)
        if hrp and player then
            -- Teleport player to Death part, facing backward (world positive Z)
            hrp.CFrame = CFrame.new(deathPart.Position, deathPart.Position + Vector3.new(0, 0, 1))

            print(player.Name .. " teleported to Death part facing front")
        end
    end
end)