How do I make a QTE which requires pressing the buttons showed on screen until time runs out?

Hello DevForum! I FINALLY got accepted, so happy about it.

  1. What do you want to achieve? - Okay, so, i want to achieve a system like this: Player steps on a part, then freezes, and on the screen of this player GUIs start showing up (The GUIs are the buttons: W A S D), and player must press the button that’s shown on screen, he must do it 4 times, he must do it quick until the time runs out (The time, let’s say, 6 seconds), same button can be shown twice (They must appear randomly), if player presses the right button, the next one’s getting shown, if player presses the wrong button, the script then cancels this system and continues itself, if player press all buttons right, then the script stops(Player stops being frozen) (I’m planning on adding debounce), if player doesn’t press all buttons in time, the script cancels the system and continues itself again.

  2. What is the issue? I’m a little bit… Dumb in terms of scripting and stuff.

  3. What solutions have you tried so far? Well, I tried looking for similar stuff on the internet and on forums, but I couldn’t find anything useful (or at least didn’t find what I could understand)

Sorry for my english as they say.

First of all you would want to detect when someone touches the part:

local part = --Path to your part
    if hit.Name == "HumanoidRootPart" then
        game.ReplicatedStorage.RemoteEvent:FireServer(game.Players:WaitForChild(hit.Parent.Name))--Or where ever you put the remote event

After that you would have to make the player freeze and open a gui like this:

local remote_event = --Path to your remote event, ex. game.ReplicatedStorage.RemoteEvent
local frame = --path to your main gui
    frame.Visible = true

local controller = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()
    if frame.Visible = false then

Then with the gui you would probably have to figure something out, but as soon as the frame now gets invisible the player will automatically be able to move again!

Player should press the button on keyboard*

Well thanks, but… Freezing/unfreezing the player is not the most important part, you know, but thanks anyway