Hey, so I’m a little bit rusty and I was wondering how I Can make it so when I adjust one parts position in a script all the other parts move adjacent with it.
So the wheat will spawn in underneath the dirt but when I try this the parts welded to the middle one won’t move with it. If i drag them around when I press run they stay in same place compared to it but when I adjust it in a script it won’t stay in same area.
All the other wheat should be on it’s side and adjusted position but they wont follow. It is welded together and the middle is anchored while the rest is unanchored. Any help would be appreciated.
local ServerStorage = game:GetService("ServerStorage")
local TweenService = game:GetService("TweenService")
local DirtFolder = game.Workspace.Dirt
local WheatClone = ServerStorage.Wheat
local function grow(dirt)
if dirt.HasWheat.Value == false then
local wheat = WheatClone:Clone()
wheat.Parent = dirt
task.wait()
wheat.Middle.Position = dirt.Position + Vector3.new(0, 0, 3)
wheat.Middle.Orientation = dirt.Orientation
end
end
grow(DirtFolder.Dirt)
Are you trying to move it with the tools in Studio? You’d have to select the model of the grain to move it, not just the single grain.
From the pictures I can see all the Parts upright in the first picture and the second shows what looks like the center Part laying beside the others. Your description doesn’t mention anything about rotating it. Are you sure it’s not unanchored and has just fallen over and laid there?
So what you are saying is you don’t want a smooth movement, you just want the grain to snap to the position.
Why not make it a Model with the center Part as the PrimaryPart and use Model.TranslateBy or Model.PivotTo?