Tweening and Physics

Guys, I use tween to move a part and touches another part to call a touch function.
But I can’t figure out why roblox physics not working with tween.
Does any solution to solve this? Explain?

1 Like

I did that test tweening a part to check if touched fired, and worked for me, but seems its dependant:

And seems this is the answer:


And maybe, instead of creating a new topic, you could bump it to receive more help

Seems you deleted your reply asking for an example. I guess you already found how to use it. But here’s the example:

local TS = game:GetService("TweenService")

local partA = script.Parent
local goalCFrame = workspace:WaitForChild("partB").CFrame

game:GetService("RunService").Heartbeat:Connect(function()
	for _, p in pairs(workspace:GetPartsInPart(workspace.partA)) do
		if p.Name == "partB" then
			warn("touched partB")
		end
	end
end)

task.wait(5)
TS:Create(partA, TweenInfo.new(3), {CFrame = goalCFrame}):Play()

Something I wanna mention, is that when tweening a part and expecting to fire a Touched event of that part, worked pretty fine for me when detecting players with the Tweened part without issues, cause player’s parts are not anchored I guess. But the Tweened part its anchored, and CanCollide is false, and still working pretty good at detecting players without using GetPartsInPart, just Touched event

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.