#How tween model with position?
1 messages · Page 1 of 1 (latest)
tween the cframe of the primary part
how im going to make it look so?
i want to make it to look at the HumanoidRootPart last pos
cframe.lookat
google is your friend
bruh
wth do u mean with google is ur friend?????
i want to know something that i didnt find on google
bro this world is cooked
you good now?
also my guy. naming a variable cframe doesn't turn it into a CFrame.
** You are now Level 1! **
your logic is completely fucked
you didn't even need to make cframe a variable in the first place. since it did nothing at all. cframe.lookAt makes no sense because your variable cframe is a Vector3 not a CFrame
there's also no need to tween the orientation of the projectile, unless that's what you intended. you would simply set the CFrame of the primarypart to look at the HumanoidRootPart
yeah i changed it
now it looks like that
but it still doesnt make sense
like getposition.CFrame
and how tf i make it to just get the position of it
not the orientation
and yes i want to make the model to look at the rootpart
why nobody answers my questions
trying to change the orientation of a model like this requires getting the current pivot
you're missing that step
Model:GetPivot() returns a CFrame
im not from america im strugglin to understand
it's okay. but you need to understand what these functions return
you wrote that line wrong.
so how i make it
...
:GetPivot() does not have any parameters
local oldPivot = ProjectileClone:GetPivot()
local newPivot = CFrame.lookAt(oldPivot.Position, ``Vector3``)
ProjectileClone:PivotTo(newPivot)
Model:GetPivot() returns a CFrame
CFrame.lookAt(Position0,Position1) : Position0 and Position1 are Vector3. The constructor returns a CFrame
Model:PivotTo(CFrame) returns a CFrame
makes sense
i think it works but the tween gets the orientation too
how i just get the position?
i will try to make it to be like the launcher projectile
looks easy
the tween should come after the orientation change
** You are now Level 2! **
and the goal should just be {CFrame = ProjectileClone:PivotTo(Whereever you want the projectile to go)}
thanks
the output said that is unable to cast a Vector3 to CF
but if i put the cframe it isnt going to get the orientation too?
heeelp
ProjectileClone:PivotTo(NewPivot)
local Tween = TweenService:Create(PrimaryProjectile, TweenInfo.new(3, Enum.EasingStyle.Linear), {CFrame = ProjectileClone:PivotTo(PickedPlayer.Character.HumanoidRootPart.Position)})
Tween:Play()
because you put a Vector3 in the place of a CFrame after I already explained to you that :PivotTo() has a CFrame parameter.
which I said in this message right here
Position is a Vector3
not a CFrame
so where i put it?
did you read the message?
yeah
I gave you each constructor with the required information for it to work
It literally says Model:PivotTo(CFrame)
are u saying that i need to make a new variable to make it tween?
hmmm
this line is wrong
let me read it a couple of times
look where you put in the "CFrame"
it's not a CFrame
it's a Position
which is a Vector3
yeah a vector3 cannot be assign as a cframe
exactly
you can not put in a Vector3 for a CFrame
you're using the constructor wrong
so how i make it
by using a CFrame
yeah i know
idk
{CFrame = PickedPlayer.Character.HumanoidRootPart.CFrame} bcz if i do like that the script gets the humanoidrootpart orientation
the script gets the CFrame of the HumanoidRootPart
yeah i just want it to get the position
bcz i alr know how to get the cframe
and mayb i will try use bodyforce but idk how use it
that makes literally no difference
it will do the same thing
what
whether you're tweening the CFrame or the Position, you're simply losing orientation
position and orientation is not the same thing
getting the Vector3 is literally going to do the same thing for you
your issue is that you don't seem to understand how tweens work
yeah i dont understand
the goal is the endpoint for the part you're manipulating
ok
you set the goal of the projectile to be your character's rootpart CFrame
so obviously, the part is just going to go to your character
so it will change to zero?
bcz if i make a CFrame = CFrame.new(Endpos.Position) it resets the position
so dont use tween?
what do you mean it resets the position?
bcz it doesnt have one so it sets to 0
huh?
whereever you're struggling
projectiles?
sure
but more specific
CFrames
Vector3's
BodyMovers
Tweens
anything you do not understand
and learn to read the documentation
it tells you what the parameters are and what the function/constructor returns
and my brain doesnt help if i dont understand english right
yeah you're just at a disadvantage right now
** You are now Level 3! **