#Cframe problem

13 messages · Page 1 of 1 (latest)

faint bear
#

idk why this isnt working someone helppp character is the thing I want to rotate and go near the part so idk what the problem is

vestal laurel
#

you're trying to face the players character in another direction?

#

or specific direction i mean

faint bear
#

well the character is just the name its actulaly just a rig head

vestal laurel
#

oh

#

try smthn likee

part.CFrame = part.CFrame * CFrame.Angles(0, math.rad(90), 0)

this rotates it by 90, you'll have to change it (part would prob be character for you)

#

this just rotates tho, are you wanting to rotate and move it together?

faint bear
#

yeah

vestal laurel
#

or more instant

vestal laurel
faint bear
vestal laurel
#

you can sample this

local part = script.Parent
local partNewCframe = game.Workspace.PartPos.CFrame

local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
    1,
    Enum.EasingStyle.Linear,
    Enum.EasingDirection.Out,
    0,
    false,
    0
)
local tween = tweenService:Create(part, tweenInfo, {CFrame = partNewCframe})

tween:Play()

i used another block for the new cframe but you can also just put your own cframe, but imo just slapping a invisible part is a bit easier? possibly

@faint bear