How to make the Tree Respawn System

local animation = script:WaitForChild("Animation")
local prompt = script.Parent.ProximityPrompt

local Basic = script.Parent.Parent
local treeFallSound = game:GetService("SoundService").TreeFall

prompt.Triggered:Connect(function(player)
	local Character = player.Character or player.CharacterAdded:Wait()
	local Humanoid = Character:WaitForChild("Humanoid")
	local animationLoad = Humanoid:LoadAnimation(animation)
	
	animationLoad:Play()
	Humanoid.WalkSpeed = 0
	Humanoid.JumpHeight = 0
	Character.HumanoidRootPart.Position = script.Parent.Parent.TpToTreee.Position
	prompt.Enabled = false
	
	wait(5)
	
	Basic.Parent = game:GetService("ReplicatedStorage")
	prompt.Enabled = true
	animationLoad:Stop()
	treeFallSound:Play()
	Humanoid.WalkSpeed = 13
	Humanoid.JumpHeight = 7.2
end)

So I have a script for the player to cut the tree, and it is removed, the question is how to make so that after a minute and a half the tree back to the same position where it was (I say right away that the tree is a model (from blender))

1 Like

You’d have to have two separate parts, the top (top trunk and leaves) and the bottom (bottom trunk and maybe stems). Then you could do something similar to this:

if tree.Destroyed.Vaue == true then 
-- idk maybe make a boolvalue in the tree called Destroyed
task.spawn(function()
task.wait(10)
bottomTrunk.Transparency = 0
-- This is assuming all you did was set its transparency to 1
end)
end