I’ve been trying for just over an hour now to fix it, but I am just stumped.
This is the code to move the part over to the paper (shown in screenshot).
local Trigger = script.Parent
local Arm = script.Parent.Parent.MoneyGrabber
local ts = game:GetService("TweenService")
local part
while task.wait() do
for i,v in pairs(workspace:GetDescendants()) do
if v:HasTag("InSortingRange") then
part = v
Arm.Busy.Value = true
part.Anchored = true
local MoveTween = ts:Create(Arm, TweenInfo.new(1, Enum.EasingStyle.Linear), {CFrame = part.CFrame})
MoveTween:Play()
MoveTween.Completed:Wait()
end
end
end
The cylinder is supposed to move exactly to where the paper’s CFrame is, but instead it goes about 1 stud over where it’s supposed to. Offsetting the CFrame by one stud messes up the rotation and makes the cylinder lie flat.
Is the Arm anchored? If it isn’t anchored, is it set to CanCollide off while tweening?
Looks like it tries to get to the right CFrame, but is colliding with the paper therefore it isn’t able to go through it into the correct CFrame.
I see that you’ve anchored the paper so it might be the arm that isn’t anchored. (And set to CanCollide on).
If you don’t want it to have CanCollide off and also not want it anchored, you can also set them to different collision groups and make them not interact with each other.
1: The instance is the cylinder
2: I do not even know how that is possible.
3: I tried restarting Studio, still didn’t work. If the engine really is just broken like this, then it’s a massive mistake on Roblox’s end.
Its like how you scale one axis but if the second axis isnt scaled with it, the width won’t
change
(Edit: Oh wait nvm, the point is still in the middle)
Optional:
Try sending the place file with the script tweening the part to your desired position so we could look into what could be the cause of this issue.
By the way, don’t send the place file with the important scripts (like the anti-cheat, game function scripts, etc)
Sorry for the very late response, I had some stuff going on
This could be the best possible solution:
while task.wait() do
for i,v in pairs(workspace:GetDescendants()) do
if v:HasTag("InSortingRange") then
Arm.Busy.Value = true
--v.Anchored = true
v.Velocity = Vector3.new(0,0,0)
if (Arm.Position - v.Position).Magnitude <= 0.04 then
v.Anchored = true
else
Arm.CFrame = Arm.CFrame:Lerp(v.CFrame, 0.1)
end
end
end
end