i want to move something and detect collisions but that cant happen with tween so what do i use?
i was doing this before that detected collisions with characters but not with any other part
game:GetService("TweenService"):Create(new, TweenInfo.new(Time), {Position = mouseLoc.p}):Play()
new.Touched:Connect(function(part)
task.spawn(function()
spell.OnTouch(part, player, mouseTarget)
end)
if part.Parent.Name ~= player.Name then
new:Destroy()
end
end)
(script not tested however should work)
I know the last replier here is probably right but I’d use
local part = workspace.Part -- your part location here
local targetXlocation = 10 -- let's say you want your part to go to x:10 y:0 z:0
local timeLength = 1 -- enter in the time you want the transition to take
local smoothness = 1 -- enter in a number from 1 to 10
local smoothness = 0.01 / smoothness
for i = 0, 1, smoothness do
part.Position = Vector3.new(i * targetXlocation, 0, 0) -- of course change the 'y' and 'z' values to the position of the part
wait(0.01 * timeLength * smoothness)
end
Just because its deprecated doesn’t mean it isn’t a good choice, the only reason it is deprecated is because they are making an improved version of all bodymovers its fine how it is right now for use since the new versions are actually less flexible and also require attachments
In several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it has been superseded or is no longer considered efficient or safe, without completely removing it or prohibiting its use.
And so, when Roblox deprecate something, they don’t want you to use it anymore unless you literally cannot make the change due to hardcoded or spaghetti code in older games
Hence why I said “unless Roblox made another oopsie” since they have a pretty good track record of deprecating things before the newer alternatives have been perfected
So, either Roblox management screwed up again badly (with zero corrections within the past month) or there’s a good reason why BodyMovers have been deprecated for a while now with no reversions?