I'm trying to make it that the tree comes out of under the ground and grows in the same spot as the character. I work with tweening parts a lot but I don't know why this one isn't working. Any help?

  local Tree = Sap:Clone()
  Tree.Name = "Tree"
  Tree.Parent = game.Workspace
  Tree.CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,-120,0)
  local TweenService = game:GetService("TweenService")
  local Info = TweenInfo.new(3,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0)
  local Goals = {CFrame = Character.HumanoidRootPart.CFrame*CFrame.new(0,-50,0);}
  local Tween = TweenService:Create(Tree,Info,Goals)
  local BV = Instance.new("BodyVelocity")
  BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  BV.Velocity = Character.HumanoidRootPart.CFrame.lookVector*0
  BV.Parent = Tree
  wait(1)
  Tween:Play()
  print("Tree Elevated")

6 comments

0

Can u call an event thats in Workspace?

0

If thats not the problem dont you have to get the service of Workspace?

0

Well I have a lot more Remote Events in Workspace that work perfectly fine. And I know that's not the issue because the tree does spawn in perfectly fine it just doesn't Tween.

0

Oh then can u edif the question to omly include the error

0

Aight

0

If you still need help Im gonna say its because you didnt define where to tween. Heres some info if you want to learn how to tween more specifically this one                               https://developer.roblox.com/api-reference/function/TweenService/Create                     https://developer.roblox.com/api-reference/class/TweenService