How would I make it so that for 30 seconds, a tool couldn't be selected, then for 45 seconds, the tool could be selected, in a never ending loop? Thanks!
If you don't want the tool visible in the backpack, just keep the tool in the lighting, then have the script move the tool into the backpack after a specific amount of time has passed. Like so:
--PUT THIS SCRIPT IN THE PLAYER wait(30) --Waits 30 seconds local Tool = Lighting["PUT TOOL NAME HERE"]:Clone() --Clones the tool Tool.Parent = Player.Backpack --Puts the tool in the backpack of Player wait(45) --Waits 45 seconds Tool:Destroy() --Removes the tool
However, if you want the tool to be visible in the backpack, you would have a value in the tool called "CanSelect" or something like that, and have the equipped function of the tool check to see if that value is true, and if it isn't, then it deselects the tool. Like so:
--PUT THIS SCRIPT IN THE TOOL local Player = game.Players.LocalPlayer --This gets the player that the script is in function onEquipped() if (not Tool.CanSelect.Value) then Player.Character.Humanoid:UnequipTools() break end --Code here end
You can have an external script change the value of "CanSelect" after a set time
Is it in a Gui? If it is, I could help you out.
Put this script in the Gui.
Put the tool in Lighting.
while true do if script.Parent.MouseButton1Click then game.Lighting.TOOLNAME:clone().Parent = backpack end script.Parent.Visible = false wait(45) script.Parent.Visible = true wait(30) script.Parent.Visible = false wait(45) end