11/15/2023 0 Comments Roblox rewind timeLocal humanoidRootPart = character:FindFirstChild("HumanoidRootPart") Game:GetService("RunService").Heartbeat:Connect(function(step) Local character = player.Character or player.CharacterAdded:Wait() Once you have the humanoidRootPart, you can simply PUSH into the stack the Cframe of the humanoidRootPart. Next, you want to get the heartbeat of the game which runs per frame to get the character’s frame. First, you want to create a new stack class using the method new. In our case, I will be using a simple way to constantly save the character’s frame. When you rewind a character, it is quite obvious that it is simply saving the CFrame of the character’s humanoid Root part. This scenario is PERFECT for using stacks and is a great way to show off what it does. (in a 1 player game, you don’t really need to make a class and you can simply use a module script but I’m only using a 1 player game for this tutorial) Stack =, Stack) end This is not a good idea for a real game for a few reasons but since this game will be 1 player only, it seems to make more sense to do this on the client. Again, my original tutorial tells you how to make it and all the methods it uses so I will just set up the class right now.įor simplicity’s sake, I will make the stack class on the client so It will be easier to connect to my button event. So the very first step Ill be doing in this tutorial is setting up the stack class. Instead, I gave a teleportation stack example that uses stacks to save teleported locations: Undo same place teleportation with clipboard using stacks. Instead, I will show you how you can make a rewind function! This is a very interesting concept that I have never thought about. I won’t be covering what a stack is or how to make a stack class because the tutorial I linked tells you everything with more than 1000 words. After watching a video of Rewinder gameplay, I thought to myself, yes it can be covered with Stacks! If you haven’t seen my Stack tutorial maybe you can check it out? How to use Stacks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |