local Time = 10
local Iterated = 0
for i = Time, 0, -1 do -- 10 is the time, change it to whatever!
if i == 0 then
task.wait(1)
Door.CanCollide = false
Door.Transparency = 1
Iterated += 1
Time = 10 * Iterated -- The wait time will add 10 each time this script goes to 0!
else
task.wait(1)
Door.CanCollide = true
Door.Transparency = 0
end
end
I do believe this should work, though it is untested! Lmk any problems you have with the code!
So this is what i did, I spawned a part then added a script with the plus icon, then pasted the code but after waiting 10 sec in the test nothing happens. how come? is the script not targeting the part?
local door = game.workspace.Door
local Time = 1
local Iterated = 0
for i = Time, 0, -1 do -- 10 is the time, change it to whatever!
if i == 0 then
task.wait(1)
door.CanCollide = false
door.Transparency = 1
Iterated += 1
Time = 10 * Iterated -- The wait time will add 10 each time this script goes to 0!
else
task.wait(1)
door.CanCollide = true
door.Transparency = 0
end
end
Ok, I figured out I had to change the Door to the part, ok, now the part does disappear but it doesn’t come back after the 10 seconds and reset itself.
Oh, it does work I tried it now, that’s cool, now all it needs is that the door collisions only affect the player that waited the 1 hour mark and not everyone in the server so someone could cheese the time of the door, is that possible to be done?