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
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.
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)
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
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
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.