How to make a floating platform that drops a few seconds after you touch it

What do you want to achieve?
I want for the platform to drop a few seconds after the player touches it.

  1. What is the issue?
    I’m not sure on how to make it work on multiple parts.
    image

You could do something that when its touched, it waits and un anchors it, like:

if touch.Parent:FindFirstChild(“Humanoid”)
wait(yourTime)
part.Anchored = false
end

As stated Touched events will work for this, however making it work for multiple parts as you stated in your question efficiently would require all of the parts to have the same parent (Folder), or for you to use CollectionService. After doing that, you can loop through each part and unanchor it. Here is an example implementation:

local function OnTouched(Hit)
	if not Hit.Parent:FindFirstChildWhichIsA("Humanoid") then return end;
	
	task.wait(2)
	
	for _, Part in pairs(workspace.Folder:GetChildren()) do -- refrence to the folder containing parts you want unanchored
		Part.Anchored = false
	end
end


workspace.Part.Touched:Connect(OnTouched) -- refrence to the touched part
2 Likes

“On multiple parts”

Do you mean all the Parts should drop together, all the parts should be welded together and drop at the same time, or each part should drop only when the player touches that part?

1 Like

All parts should drop at the same time

Then Weld them all together using WeldConstraints. Just have 1 Anchored and then unanchor it to make them all drop.

If they need to drop vertically perfectly flat you could use a PrismaticConstraint to keep them horizontal.

If you want them all to become unanchored and tumble individually then use @alphadoggy111’s script.

1 Like

Made his script work just like I wanted, thanks for the help :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.