TimeModule - Reverse and speed up/slow down time with ease

New update!

Changes:

  • Module now catches more errors, which should be more helpful for debugging.
  • Added Unreverse function
  • Added IsReverse function
  • INTERPOLATION! WOOHOO! You have to pass the delta time as the first argument into Update() though.

Get the module here:

Have fun programming with this module.

4 Likes

I was wondering, is there any way to make the module work with cars?

Cars seem to work fine for me, are you using a particular chassis or anything?

1 Like

I tried using the roblox standard motorcycle and a car with A-Chassis.

Whoa this is so cool resource!

It is awesome and some of the bugs have been ironed out but there is still the bug of that it will revert to its reversed state after being reversed.

i actually saw this on twitter, and it was awesome! I cant wait to make a game with this! Do you require credit for this module?

I love this :smiley: I’m probably gonna use it for my side-project (Time God boi) and my Gauntlet game (For the Time Stone).

2 Likes

this could be used in super power games or anime based games. so player could have “reverse time” super power and when he has enough stamina animation fires cutscenes shows everything becomes black and white and goes back in time. it would be shown for every player in-game

I’m working on a game that is a soon-to-be open sourced game, with Chronos: The God of Time, and TTC (Tick Tock Clock). I’m using the reverse time model for it (I’ll make sure to credit his username and model in the script of “README”)

thanks, but i don’t really need help with it.

oh nice i now can make a bites the dust sequence haha

2 Likes

Not sure if I missed something but for some reason it does not work. Changing the number on :SetTime() does not effect anything either. What could be the issue?

Code:

local timeModule = require(game:GetService("ReplicatedStorage").TimeModule)

wait(3)

for _,v in ipairs(workspace:GetDescendants()) do

if v:IsA('BasePart') then

timeModule:Track(v)

end
end

print("run")

timeModule:Reverse()

timeModule:SetSpeed(0.1)

while true do
timeModule:Update(0.1)
wait(0.1)
end

The problem is that you’re reversing right after tracking the objects, when there are no positions to iterate through.

Try placing the while loop in a coroutine, and calling Reverse() a few seconds after. You should also do game:GetService("ReplicatedStorage"):WaitForChild('TimeModule') instead of directly indexing since things don’t replicate instantly.


I recommend you DM me or go to #help-and-feedback:scripting-support if you want help with your scripts, to abide by the devforum rules. Good luck!

1 Like

Hello! I got a question, i’m doing a game, and I’m wondering if this module could cause some major lag on the players?

Hello! Sorry for bumping, I only need to say that I got a pretty big problem.

On this template, of the Cloth, how would I fix that?

1 Like

to be honest, this is just great!.

also one question, how can i make that only the player char get reversed and not the other parts?

1 Like

Hello there!

I’ve stumbled acrossed your module and I got to say, it’s pretty easy to actually reverse time whatever you wish, the only issue is that I am wondering how you can stop reversing time when a certain thing happens such as stopping in a certain position. How can I do this? Thanks in Advance.

IIRC, Properties such as Position and AssemblyLinearVelocity don’t actually fire their changed signals unless the property is set through Lua, and not the engine itself.

The engine essentially does a “Soft Update” (I don’t know if there is an actual name for this) that doesn’t fire any events related to a Part changing. If you were to update the Position through a Lua script though, events would behave normally.

So ideally, you would only add the Part to the table if the position has changed since the last recorded tick. You wouldn’t be able to use PropertyChangedSignal. My guess is they did this for performance reasons.

@brokenVectors

The script doesn’t work for some reason and there are no errors; will the script work if it’s done by the server?