I’m a small YouTuber and I make ROBLOX studio related videos, and this time my video idea was to create the ROBLOX Jailbreak Casino robbery which released on April 2nd 2022. Everything works, except one thing, how do I make a robbery opening and closing system? I have no idea how Jailbreak did it, and hoping to see if anybody else has some good ideas.
Hmm, have you tried checking the Lighting.TimeOfDay and firing events to open and close the robbery when the times align the time you want said casino to be robbed? not really sure if you can do that with Lighting.TimeOfDay but it’s worth a shot?
try mixing it with :GetPropertyChangedSignal() but I don’t know if that would work or not since I dont really get the property changed signal yet-
good luck on your video! lmk if I can be of help:)
Add a bool value that can show opened or closed. and make script like
local coolTime = math.random(100,120)
local boolValue = script.Parent
local robbingTime = 100
while wait(coolTime) do
boolValue.Value = true
wait(robbingTime)
boolValue.Value = false
end
(other script)
boolValue.Changed:Connect(function(value)
if value == true then
-- run if opened
else
-- run if closed
end
end)
The thing is that You can check Lighting.ClockTime.
You can make an event like
game.Lighting.ClockTime.Changed:Connect(function()
-- do ur code here
end)
The function returns new ClockTime value, therefor You can do if condition here
game.Lighting.ClockTime.Changed:Connect(function(newTime)
local openTime, closeTime = -- values of your choice
if newTime == openTime then
-- ur code
elseif newTime == closeTime then
-- ur code
end
end)