Making a touched part tween a certain way

I’m trying to figure out how I would go about making it when a player touches our part, it tweens in the way the player is facing. I tried many things but it just didn’t work. Any ideas on how I could achieve this effect?

Image1

im2

This is how it make it work now, but it tweens right of the player and not towards the player

local movedir = hit.Parent.HumanoidRootPart.CFrame.LookVector

local vector = grass.PrimaryPart.CFrame * CFrame.Angles(math.rad(movedir.X * multiplier), math.rad(0), math.rad(movedir.Z * multiplier))		

I’ll assume you know how to actually tween parts.

  1. check if player touched part (touched returns a part; use that part to find the player model)
  2. tween the part to the rotation of the humanoid root of the player’s model.
1 Like

A. That would not work because the humanoidrootpart is always upright

B. It would not reach the desired effect

CFrame.lookAt might be your best bet.

2 Likes