How would i make a something burrowing underground type thing

I would like when you press a certain button lets say x a bunch of pre designeds parts on the ground make it look like something is burrowing and when they get to player two it slows them i have the slowing part down

so far i dont know where to go with this but i want to try to make it look like these
example 2

Thank you if you try to help

-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

Make an pre designed part, then clone it next to player foot position and extend it’s size to where the player is looking.
If other player touches it slow down there speed like this:

part.Touched:Connect(function(hit)
 if hit:FindFirstChild("Humanoid") then
  hit.Humanoid.Walkspeed = 10 -- Change
 end 
end)

but wont the part look stretched? im thinking about multiple tiny parts that are pre designed

1 Like

You could pre-make a model and then at runtime change the cframe of every single part so that it is random and have their sizes go up randomly

Im currently working on the script right now for testing
image

Alright youll have to probably mak some adjustments for how you want to implement it but here is the main mechanic down though!

local burrow = game.ReplicatedStorage.Burrow
local tween = game:GetService("TweenService")

local player = game.Players.LocalPlayer
local character = player.Character
local root = character:WaitForChild("HumanoidRootPart")

task.wait(3)

for i = 1, 30 do
	local clone = burrow:Clone()
	clone:SetPrimaryPartCFrame(root.CFrame - root.CFrame.UpVector * 3.5 - root.CFrame.LookVector * 15
	)
	for k,n in pairs(clone:GetChildren()) do
		local size = tween:Create(n,TweenInfo.new(.35),{Size = n.Size + Vector3.new(0,math.random(1,2),0)})
		size:Play()
		local cframe = tween:Create(n,TweenInfo.new(.35),{CFrame = n.CFrame * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))})
		cframe:Play()
	end
	clone.Parent = workspace
	task.wait(.1)
end
1 Like

HOLY THANK YOU
this is exactly it

1 Like

did you weld your model together?

I just anchored it, it makes more sense cause itll be stationary when the burrowing is happening

Please do not ask people to write entire scripts for you, in your post it is literally put at the last line…

1 Like

He didnt ask for an entire script, he just didnt know what to do.

I just nudged him in the right direction

Didn’t you almost do like the entire script for them?

1 Like

Nope, It might actually look like that but he still needs to figure out a way to make Player2 use the borrowing onto Player1

If you use a local script for this, the burrow part won’t be visible for other players. I recommend using remote events for this

Well thats not for me too make, I just showed him how to make the burrow parts he can figure all the rest of that stuff himself

I have figured it out but the only problem i have is that the speed is slower when closer to your target

local root = player.Character:WaitForChild("HumanoidRootPart")

			for i = 1, 100 do
				local clone = burrow:Clone()
				clone:SetPrimaryPartCFrame(root.CFrame)
				clone:SetPrimaryPartCFrame(clone.PrimaryPart.CFrame:Lerp(mousePos.Parent.HumanoidRootPart.CFrame,i * .01)- root.CFrame.UpVector * 3.5 - root.CFrame.LookVector)



				for k,n in pairs(clone:GetChildren()) do
					local size = tween:Create(n,TweenInfo.new(.35),{Size = n.Size + Vector3.new(0,math.random(1,2),0)})
					size:Play()
					local cframe = tween:Create(n,TweenInfo.new(.35),{CFrame = n.CFrame * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))})
					cframe:Play()
				end
				clone.Parent = workspace
				task.wait(.000000001 * (root.CFrame.Position - mousePos.Parent.HumanoidRootPart.CFrame.Position).Magnitude)
			end

The speed of them spawning is slower when closer to the target?

the speed of the line in general is slower

or wait what i actually mean is i think its the same speed no matter what even though i put the distance into the equation

i fixed it i just made the amount of times the loop loops dependant on the distance

local root = player.Character:WaitForChild("HumanoidRootPart")
			
			local dis = (root.CFrame.Position - mousePos.Parent.HumanoidRootPart.CFrame.Position).magnitude
			print(dis)			
			for i = 1, dis do
				local clone = burrow:Clone()
				clone:SetPrimaryPartCFrame(root.CFrame)
				clone:SetPrimaryPartCFrame(clone.PrimaryPart.CFrame:Lerp(mousePos.Parent.HumanoidRootPart.CFrame,i /dis)- root.CFrame.UpVector * 3.5 - root.CFrame.LookVector)



				for k,n in pairs(clone:GetChildren()) do
					local size = tween:Create(n,TweenInfo.new(.35),{Size = n.Size + Vector3.new(0,math.random(1,2),0)})
					size:Play()
					local cframe = tween:Create(n,TweenInfo.new(.35),{CFrame = n.CFrame * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))})
					cframe:Play()
				end
				
				
				clone.Parent = workspace
				print(.0001)
				wait(.000000000001)
			end

Hey there, glad your issue is resolved. But you should credit the solution to @astraIboy. Yes you may have made changes to make it exactly how you needed, however, astral created the main system for you.

1 Like