How to tween part to its side

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    A door.

  2. What is the issue? Include screenshots / videos if possible!
    Idk how to tween things to the side.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    None.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

script.Parent.Touched:Connect(function(OP)
	if game.Players:GetPlayerFromCharacter(OP.Parent) then
		local Tween = game:GetService("TweenService"):Create(script.Parent.Parent.PrimaryPart, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut, 0, false, 0), {["Position"] = script.Parent.Position + (script.Parent.CFrame.LookVector * 2.5), ["Orientation"] = script.Parent.Orientation + Vector3.new(0, 90, 0)})
		Tween:Play()
	end
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

Btw you don’t have to do this, you could do this: `Position’. No need for the square braces and quotes.

Wait nvm

1 Like

And for PrimaryParts (they’re just regular Parts) which are not models, you can just tween the CFrame of the PrimaryPart

It should work after you tween the CFrame

it is the entire script. why dont you believe that.

1 Like

Sorry about that! I didn’t look at your script carefully enough, it was my mistake.

Kind of confused by what you mean with “to the side”.

If you mean sliding, then you can just tween the position of the part to a new position, or you could tween the CFrame instead, which I prefer.

If you meant rotating open like a door, mess around with the Pivot of the part since that changes where the part rotates from

if you wanna move a part to its side then you can use cframe like:

tween goal = {CFrame = Part.CFrame*CFrame.new(5,0,0)}

(you might have to edit some stuff

if it doesnt go to the side but a different direction you have to change the 5 to somwhere

ok. i probably will use this for a different project as i paused that project. go here for now. How do i get characters to move - #6 by GenXMyth also can you still help with my newer project? the one named baldis basics revived?

1 Like