Tweening a lot of things

Hey everyone, So today (This is for an obby) I wanted to make a stage where there are 15 plants up top and they “Eat” you. Really they are just falling on top of you when you hit the detector. I’ve doing it for a while but not really sure how I could do this a fast way. There are 15 of them that are hanging from the ceiling and I just want them to fall when touched. I also want to Tween the object but I always get an error saying that Position is not a object in Model. I am not sure how I can do it any other way since I can’t make my meshparts unions. If anyone knows how to help me with this, please leave a comment on this.

Can you try to specify your problem in an example? I don’t understand.

ok, so basically when I try to code one of the plants it always gives me an error. An error that I have never seen before with tweening. It either says that the model doesn’t have a position (Which is true) or Argument 3 missing or nil. The 2nd one is what I keep getting the most. I was going to do it in serverscriptservice so I could script all of them in one script but then I just decided to do it in multiple.
I just need help with my script basically. here is my script

local TweenService = game:GetService("TweenService")
local part = game.Workspace.Greenthing.GreenThing
local detector = game.Workspace.Detector1

local info = TweenInfo.new(1,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out)

local properties = part:MoveTo(Vector3.new(250.32, -65.676, -464.47))
local prop = part:MoveTo(Vector3.new(250.32, -49.796, -464.47))

local tween = TweenService:Create(part,info,properties)
local Tween = TweenService:Create(part,info,prop)

detector.Touched:Connect(function(hit)
	if hit.Parent:WaitForChild("Humanoid")then
		tween:Play()
		wait(3)
		Tween:Play()
	end
end)

I’m pretty sure you can’t use the MoveTo() as a property.

Alright, I’m not sure the error because I’m only begineer, but try to make the properties variable into a list containing all the final results you need

As others have said the last arguement of the TweenService:Create function accepts a table of what all properties to tween so you would want to change the properties and prop variable accordingly. As an example here:

local properties = {Position = Vector3.new(250.32, -65.676, -464.47)}

Yea, I did do that, That’s how I always do it, this time I couldn’t do it because it would give me an error. It would say that position is not a valid member of the model, or position isn’t a property in a model.

I looked at the object browser and went down to look at the stuff I could use for position in models, and it said that I could use MoveTo() in a model, but I’m not sure. It even gave me the option to pick it. Usually when it isn’t a property it wont give the option to pick the property.

So what have to do is weld all other parts in the model to the primary part. Then tween that primary part

I am also new to scripting, I’m only good with tweening but I don’t know what is really happening here haha.

1 Like

Tween service can tween the properties of an instance only if I’m right

1 Like

ohhhhh, ok… Let me try that out.

CAN we see ur workspace that contains the plants and show all the childrens?

tweenproblem

Okay, I think I know why. Your trying to change the model’s position, but there’s no position for models in the properties tab. Try using GetChildren() for that model.

I have done that, but when I do that, I get confused on what I was supposed to do next.

And don’t use MoveTo(), just do this.

local properties = {Position = CFrame.new(position)}

Does it matter if I use vector3?

local parts = game.Workspace.Greenthing.GreenThing:GetChildren()

Nope, use vector3 if u want. CFrame suits well for me.