Heya!
I was on Roblox Studio working on my stuff… And I have a problem, I’ve created a BoolValue for a system and I would like to make a simple script that makes when the tool (witch contains the boolValue) is spawned on the player’s inventory, then wait 45 minutes (2700 seconds) and then, make the BoolValue true.
That’s all! If someone can help me to solve this, that would be great, thanks!
-- local script version
local player = game.Players.LocalPlayer
repeat task.wait(1) until player.Backpack:FindFirstChild(nameOfTool)
task.wait(2700)
path.to.your.bool.Value = true
-- server script version
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
-- add task.spawn() if you have other code later in this script that you need to run
task.spawn(function()
repeat task.wait(1) until player.Backpack:FindFirstChild(nameOfTool)
task.wait(2700)
path.to.your.bool.Value = true
end)
end
Hope this helps
REVISION: I accidentally put “player:FindFirstChild(nameOfItem)” when it should’ve been player.Backpack:FindFirstChild(nameOfItem) oops!