Tweening Tree Grouped

Im trying to make a tree fall over but whenever it falls over it does not bring the leaves with, and I used weildconstraints to link the leaves and their not ancored so idk what im doing wrong.

		local goal = {Orientation = Vector3.new(0,0,75), Position = script.Parent.Position + Vector3.new(0,-3,0)}
		local tweenlog = Tween:Create(tree.Tree,tweenInfo,goal)

Did you actually play the tween?

yeah ill give the wwhole code,

local handle = script.Parent
local Players = game:GetService("Players")
local goi = Players.LocalPlayer.PlayerGui.Gui
local Tween = game:GetService("TweenService")
local Replicatedstorage = game:GetService("ReplicatedStorage")
local Woodadd = Replicatedstorage.Wood
local woodPosition = UDim2.new(0.253, 0,-0.028, 0)
local tweenInfo = TweenInfo.new(2)
local leaderstats = Players.LocalPlayer:WaitForChild("leaderstats")
local wood = leaderstats.Wood
rotation = CFrame.Angles(0,0, math.rad(75))
local canSwing = true
db = true

handle.Touched:Connect(function(hit)
	if hit.Parent.Name == "Tree"and db == true  and not canSwing then
		local amount

		if goi:FindFirstChildOfClass("IntValue") then -- since you parent your int value to the goi thing I checked that

		else
			amount = Instance.new("IntValue")
			amount.Parent = goi
		end
		amount = goi:FindFirstChildOfClass("IntValue")
		
		local tree = hit.Parent
		local modelCFrame = tree:GetPivot()
		db = false
		
		goi.CanvasGroup.Visible = true
		amount.Value += 1
		
		local goal = {Orientation = Vector3.new(0,0,75), Position = script.Parent.Position + Vector3.new(0,-3,0)}
		local tweenlog = Tween:Create(tree.Tree,tweenInfo,goal)

		if amount.Value == 1 then
			goi.CanvasGroup.Amount.Size = UDim2.new(0.20,0,0,75)
			local random = math.random(1,90)
			local xnew = random/100
			local wood2 = game.ReplicatedStorage.Wood:Clone()
			wood2.Parent = Players.LocalPlayer.PlayerGui.Items
			wood2.Position = UDim2.new(xnew,0,0.76,0)
			wood2.TextLabel.Text = "+1"
			local tween = Tween:Create(wood2, tweenInfo, {Position = woodPosition})
			tween:Play()
			task.wait(1.3)
			wood.Value += 1
			wood2:Destroy()
		end
		
		if amount.Value == 2 then
			goi.CanvasGroup.Amount.Size = UDim2.new(0.4,0,0,75)
			local random = math.random(1,90)
			local xnew = random/100
			local wood2 = game.ReplicatedStorage.Wood:Clone()
			wood2.Parent = Players.LocalPlayer.PlayerGui.Items
			wood2.Position = UDim2.new(xnew,0,0.76,0)
			wood2.TextLabel.Text = "+1"
			local tween = Tween:Create(wood2, tweenInfo, {Position = woodPosition})
			tween:Play()
			task.wait(1.3)
			wood.Value += 1
			wood2:Destroy()
		end
		
		if amount.Value == 3 then
			goi.CanvasGroup.Amount.Size = UDim2.new(0.6,0,0,75)
			local random = math.random(1,90)
			local xnew = random/100
			local wood2 = game.ReplicatedStorage.Wood:Clone()
			wood2.Parent = Players.LocalPlayer.PlayerGui.Items
			wood2.Position = UDim2.new(xnew,0,0.76,0)
			wood2.TextLabel.Text = "+1"
			local tween = Tween:Create(wood2, tweenInfo, {Position = woodPosition})
			tween:Play()
			task.wait(1.3)
			wood.Value += 1
			wood2:Destroy()
		end
		
		if amount.Value == 4 then
			goi.CanvasGroup.Amount.Size = UDim2.new(0.8,0,0,75)
			local random = math.random(1,90)
			local xnew = random/100
			local wood2 = game.ReplicatedStorage.Wood:Clone()
			wood2.Parent = Players.LocalPlayer.PlayerGui.Items
			wood2.Position = UDim2.new(xnew,0,0.76,0)
			wood2.TextLabel.Text = "+1"
			local tween = Tween:Create(wood2, tweenInfo, {Position = woodPosition})
			tween:Play()
			task.wait(1.3)
			wood.Value += 1
			wood2:Destroy()
		end
		
		if amount.Value == 5 then
			goi.CanvasGroup.Amount.Size = UDim2.new(1,0,0,75)
			local random = math.random(1,90)
			local xnew = random/100
			local wood2 = game.ReplicatedStorage.Wood:Clone()
			wood2.Parent = Players.LocalPlayer.PlayerGui.Items
			wood2.Position = UDim2.new(xnew,0,0.76,0)
			wood2.TextLabel.Text = "+1"
			local tween = Tween:Create(wood2, tweenInfo, {Position = woodPosition})
			tween:Play()
			tweenlog:Play()
			goi.CanvasGroup.Visible = false
			goi.CanvasGroup.Amount.Size = UDim2.new(0.2,0,0,75)
			amount:Destroy()
			task.wait(1.3)
			wood.Value += 1
			wood2:Destroy()
		end
		
		task.wait(1)
		db = true

	else
		print(hit.Parent.Name)
	end	
end)

handle.Parent.Activated:Connect(function()
	if canSwing then
		canSwing = false

		task.wait(1)

		canSwing = true
	end
end)

Why did you name gui “goi” in your variables. Is that intentional?

idk but do you know a away to fix my issue, alos is there a easy way to make it so if you click it removes health and displays the health?

Just to be clear, is this an actual tree or a GUI tree? I’m seeing you use Udim2 values for tweening the position…

EDIT: am in school rn, brb.

its a acutaul tree in game that you have to chop down

Gotta use Vector 3 values then, also if it’s a model then tween the primary part’s position.

the primary part is the tree.Tree

Gimme 15 minutes, I gotta walk home lol

got i :::::::::::::::::::::::::::::::::::::::::

You should tween CFrame instead of the Position and Orientation. For some reason, changing Position and Orientation directly doesn’t affect welded objects.

The problem is here,

local goal = {Orientation = Vector3.new(0,0,75), Position = script.Parent.Position + Vector3.new(0,-3,0)}

You have to tween the CFrame when you are tweening models
Angles = CFrame.angles(), position = CFrame.new() they function similarly to Vector.new() so you won’t have to change much.
|
Also make sure you’re using math.rad(--your number) when tweening the oriations
Example

local goal = {CFrame = CFrame.angles(0,0,math.rad(75))}

|
This post may also help

it givers an eror with attempt to call nil value whenI use the code though

what exactly are the code you’re using as of now?

Im using it to twewen a tree falling down

I mean the actual code, what code did you use just now that gave you the error

this gave the error

		local goal = {CFrame = CFrame.angles(0,0,math.rad(75))}
		local tweenlog = Tween:Create(tree.Tree,tweenInfo,goal)

Try using this function:

local function TreeFalls(tree, angle : number) -- should be the tree model
local TS = game:GetService("TweenService")
    local tween_info = TweenInfo.new(2, Enum.EasingStyle.Bounce)
    local tween = TS:Create(tree.PrimaryPart, tween_info, {
        CFrame = tree.PrimaryPart * CFrame.angles(0,0,math.rad(angle)) + Vector3.new(0,-3,0)
    })
    tween:Play()
end

nothing happwens, i think i implemented it wrong