Breakable Crate with a Reset Timer thumbnail
0 views0 copies0 likes

Breakable Crate with a Reset Timer

Universal script

Copy it, then test it in your own Studio place.

Utilities Verified

Script code

20 lines · 0.8 KB
Download
local Debris = game:GetService("Debris")local crate = workspace:WaitForChild("TrainingCrate")local prompt = Instance.new("ProximityPrompt", crate)prompt.ActionText = "Open crate"local original = crate.Transparencyprompt.Triggered:Connect(function()	if not prompt.Enabled then return end	prompt.Enabled, crate.CanCollide, crate.Transparency = false, false, 1	for i = 1, 6 do		local piece = Instance.new("Part")		piece.Size, piece.Color = Vector3.one * 0.6, crate.Color		piece.CFrame, piece.CanCollide = crate.CFrame, false		piece.Parent = workspace		local angle = i * math.pi / 3-- …open Get script for the full source

About this script

Put an anchored box named TrainingCrate in Workspace. Its interaction prompt replaces it with six short-lived blocky pieces and restores the original crate four seconds later. Each fragment has collision disabled to keep the practice area clear. Update the reset delay or fragment colors for a reward animation, and test multiple people trying the prompt at the same time.

Comments

Share what works, ask questions, or report an issue.

0

Log in to leave a comment.

No comments yet

Be the first to share your thoughts!

Raw Luau source

local Debris = game:GetService("Debris")
local crate = workspace:WaitForChild("TrainingCrate")
local prompt = Instance.new("ProximityPrompt", crate)
prompt.ActionText = "Open crate"
local original = crate.Transparency
prompt.Triggered:Connect(function()
	if not prompt.Enabled then return end
	prompt.Enabled, crate.CanCollide, crate.Transparency = false, false, 1
	for i = 1, 6 do
		local piece = Instance.new("Part")
		piece.Size, piece.Color = Vector3.one * 0.6, crate.Color
		piece.CFrame, piece.CanCollide = crate.CFrame, false
		piece.Parent = workspace
		local angle = i * math.pi / 3
		piece.AssemblyLinearVelocity = Vector3.new(math.cos(angle) * 13, 17, math.sin(angle) * 13)
		Debris:AddItem(piece, 1.25)
	end
	task.wait(4)
	crate.Transparency, crate.CanCollide, prompt.Enabled = original, true, true
end)