Red Light, Green Light Game

Hey!

So after watching the Netflix Series called Squid Game, I saw one of my childhood games called “Red Light, Green Light”

I thought about remaking the game, but I’d need some help for starters.

So first off, lets say every 10 minutes the game starts, everyone gets teleported and whoevers in the game will be scanned (explained later in the post).

So when the game host says “green light” everyone can walk, when they say “red light” everyone has to stop, otherwise they’ll be eliminated (by scanning the movement, and whoever moves should be removed).

How would I go about detecting if the players are walking and/or jumping after a specific sound/audio has played, and only the people which are playing?

Ofcourse, I’ve tried this myself before by using 2 teams, 1 is the “alive team” the other is the “dead team”, and then scanning every character/player in that team their velocity, to see if they’re moving. That wasn’t really performant, in my opinion so I need a better solution for this.

Could anyone please help me out with this?

2 Likes

I suggest taking a look at this. I used it for my sprinting script to detect when a player was moving to active an animation so I feel it could work for u.

Humanoid.Running (roblox.com)

Then of course just get it so when a message is sent it checks if the user who sent it is the host and if it is if it the host says green as an example it will let everyone move but if red it will detect and remove when someone moves.

1 Like

You could use the Humanoid’s Running event to detect if they are moving during the Red Light phase.

Example:

Humanoid.Running:Connect(function(speed)
	if speed > 0 and RedLightActive then
		Humanoid.Health = 0
	end
end)
4 Likes

what if they dont stop Running


try

function stop()
    for i, player in ipairs(game.Players:GetPlayers()) do--
        if player.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0)then
            player.Character.Humanoid.Health = 0
        end
    end
end

call stop when the players need to stop

2 Likes

Right, thanks for all of these responses they really helped me out!

I’ll take a look into these solutions and mark whichever one was the most performant/worked the best.

1 Like