Doing this because I have a group/game that has something to do with Janitors so, how do I make it so that they click on the "dirt" block and it goes away but after like 5 mins it would generate again.
You would need to use a ClickDetector and the actual part.
--An example includes script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked) script.Parent.ClickDetector.MaxActivationDistance = 0 --'Disables' clicking script.Parent.Transparency = 1 --Transparent wait(300) --Wait 5 minutes script.Parent.Transparency = 0 --Opaque script.Parent.ClickDetector.MaxActivationDistance = 32 --Default distance end)
Edit
local group = 2718024 local rank = 3 script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked) if playerWhoClicked:GetRankInGroup(group) >= rank then --Checks whether the player meets these conditions script.Parent.ClickDetector.MaxActivationDistance = 0 --'Disables' clicking script.Parent.Transparency = 1 --Transparent wait(300) --Wait 5 minutes script.Parent.Transparency = 0 --Opaque script.Parent.ClickDetector.MaxActivationDistance = 32 --Default distance end end)