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”)
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!
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.