Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a regen button that dissapears when you step on it?

How do I make a dissapearing regen button? You step on it and then it dissapears temporialy then it comes back. I want it to dissapear for 200 seconds. I don't know how to code.

1 answer

Put a part inside workspace and then inside the part put in a script and insert this in it.

local healpart = script.Parent
local amount = 50

script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
	if humanoid then
		humanoid.Health = humanoid.Health + amount
		healpart.Parent = game.ServerStorage
		wait(200)
		healpart.Parent = workspace
	end	
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.