Touch Event Messing Up Collision Groups and Tween What Can I Do To Fix It?

Short Summary;

I’m tweening a part and setting it’s collision group but detecting touch with Touched Event creates a problem

as seen in the GIF

The part will go on top of the Character’s head when touched despite the Collision group settings

I reported it as a bug here

BUT

I still need a solution for this,I want to detect Touch on the Server

Does any of you have a clever solution?

Tween CFrame instead of Position, as that won’t invoke safe move.

I did try that before and It presented a new problem

https://gyazo.com/ba6b83668a5cf48ce878e57d29640a9c

Tweening With CFrame.rbxl (13.6 KB)

@EchoReaper

It’s a Disaster

CFrame isn’t just position – it has a rotation component as well. What you’re doing is telling TweenService to tween the part not just from its current position, but it’s current orientation as well. CFrame.new(px,py,pz) returns a CFrame with a rotation of 0,0,0, and because your part’s rotation is not 0,0,0 to begin with, it tweens between the two rotations.

You need to keep your target CFrame’s orientation the same as the original:

local Pos = part.Pos.Value
local targetCFrame = part.CFrame - part.CFrame.p + Pos

TweenService:Create(part, tweenInfo, {CFrame = targetCFrame}):Play() 

- part.CFrame.p subtracts the current position component from the CFrame, making it only rotation. Then we add a new position component, creating a CFrame with the rotation of the original and position of the new.

https://gfycat.com/CalculatingArtisticFlyingfox

It’s working Fantastically!

Thank you! :+1: