How to make something moveable not fall?

Basically, there is a model. The model is supposed to stay still in the air (vertically), but in a certain moment tween to the other edge of the screen without falling. But, if I anchor one and weld all the parts, it still doesn’t move! And, I can’t add a plataform below :frowning:

3 Likes

well if you weld all parts to one part, and have that part anchored, and then tween said part, it shouldnt be an issue, if its still a problem, maybe using a linearvelocity, and set its velocity to (0,0,0) so it cant fall

3 Likes

uh? explain better this pls:

btw i heard you are a great forum member, I’m honored to have you here :smiley:

3 Likes

Aw thank you! Glad to know someone cares about my existence!
You said you were tweening something to an edge of the screen right? Just making sure I read this right.
Also, on the subject can I see the code?
And also an image of what you are trying to tween, like the layout order of it in the workspace.

Lets begin with that to help get us started!

1 Like

Yes you read it right.


The code: (it has some debugging stuff I did with someone else)

local TweenService = game:GetService("TweenService")
local pipePrimaryPart = script.Parent.PrimaryPart
local endCFrame = script.Parent:FindFirstChild("EndCFrame")

if pipePrimaryPart then
	if endCFrame then
		local tweenInfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
		local goal = {CFrame = endCFrame.CFrame}
		local glide = TweenService:Create(pipePrimaryPart, tweenInfo, goal)

		local function work()
			glide:Play()
		end
		workspace.Events.Start.Event:Connect(work)

	else
		warn("no endCFrame")
	end
else
	warn("no primary part")
end

Screenshot 2024-09-15 161643
Parent of PipeSets is workspace
Screenshot 2024-09-16 203753
I also have this, which is also a child of workspace


The part I’m trying to tween, which is a placeholder btw

2 Likes

Hmm idk if you said it already, but did you try welding the parts you want to move with the primarypart, to the primaryPart?

Yes but the main was not the primary part. If you pay attention to the image you can see the green welds, btw the primary part is a super small cube (0.1 studs on every side) on the right

Edit:

Can you show me a video of what happens when you try to use this?

1 Like

Uh I can’t rn, but what happens is nothing, The part just stays still

1 Like

Wait what parts are welded? Just the primaryPart right? Double check for me please

1 Like

The big part is welded to every other part in the model.

1 Like

Ok so I think all the welds should be welded to the primaryPart, so that meaning part0 (if part0 isnt a thing do part1) of the weld should be the primaryPart, then make sure everything other than the primaryPart is unanchored

1 Like

But how is the primaryPart supposed to tween?
Btw it did not work

1 Like

Well see anything can be tweened whether anchored or not, as tweens dont use physics to move, rather just changing the position in your case, at a set speed

1 Like

oh. then why is not working argh :sob:

2 Likes

Do you think it’s a scripting error?

Hello? I still didn’t find out the issue. Do you recommend to try another way of doing what I want? PLEASE help me, this project is important for me

Hmm is it possible you could send me the place file? Or at least any code related to the thing youre trying to move. along with the model itself?

Uhh I’ll try that ASAP, I can’t right now

1 Like
local TweenService = game:GetService("TweenService")

function TweenModel(model: Model, tweenInfo: TweenInfo, CFrame: CFrame)
    local CFrameObject = Instance.new("CFrameValue")
    CFrameObject.Value = model:GetPivot()

    local tween = TweenService:Create(CFrameObject, tweenInfo, {CFrame = CFrame})
    local connection = CFrameObject:GetPropertyChangedValue("Value"):Connect(function()
        model:PivotTo(CFrameObject.Value)
    end

    tween.Completed:Once(function()
        connection:Disconnect()
        CFrameObject:Destroy()
    end)

    tween:Play()
end