Hi everyone I'm a bit new to this Discord and to scripting, and I've been trying to Tween a model through a part. In this case, I want a model of a tree, grass, or bush to emerge through the baseplate. I've been struggling a lot, and I joined here to figure out how to fix it.
In the image I added, you can see that the Model just kinda sits there... I'm not even sure if it's trying to move!
Any help is appreciated. 🥹 (sorry if i posted too much, im not sure what to exclude)
local function PlaceClones(clone, x, z, height)
local primaryPart = clone:FindFirstChild("PP")
local tweenInfo = TweenInfo.new(
1,
Enum.EasingStyle.Elastic,
Enum.EasingDirection.Out,
0,
false,
0
)
local y = height / 2 + 2
local properties = {
["Position"] = Vector3.new(x, 30, z),
}
local tween = TweenService:Create(primaryPart, tweenInfo, properties)
end
--Set the clone's position to prepare for the tween
local function CreateClones() --Create clones and store them
for i = 1, spawnLimit - totalSpawns, 1 do --Create 500 clones
--Set the clone's position to prepare for the tween
local x, z = RollPositionXZ()
local cloneHeight = clone:GetExtentsSize().Y
local y = -cloneHeight / 2 - 2
clone.PP.CFrame = CFrame.new(x, y, z)
PlaceClones(clone, x, z, cloneHeight)
end
end