Minigame that kills players if they don't stand on the correct color board

Lol your file’s scripts are all print(“Hello world”)?

  1. place a model inside of workspace named ‘Touchpads’
  2. place bricks inside of the model preferably next to eachother like tiles
  3. place a script into serverscriptservice, name it whatever you want
  4. paste this code into your script, this is just an example.
local bricks = workspace.Touchpads:GetChildren()
local colors = {"Really blue", "Really red", "Lime green", "Deep blue", "Institutional white"}

for i,v in pairs(bricks:GetChildren()) do
	v.Touched:Connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid") then
			local character = hit.Parent
			if game.Players:GetPlayerFromCharacter(character) then
				local player = game.Players:GetPlayerFromCharacter(character)
				local playertouched = player:FindFirstChild("TouchedColor")
				if playertouched then
					playertouched.Value = v.BrickColor
				end
			end
		end
	end)
end
game.Players.PlayerAdded:Connect(function(player)
	local val = Instance.new("StringValue")
	val.Parent = player
	val.Name = "TouchedColor"
end)
while wait(1) do
	local radcolor = colors[math.random(1,#colors)]
	local radbrick = bricks:GetChildren()[math.random(1,#bricks:GetChildren())]
	radbrick.Color = radcolor
	for i,v in pairs(bricks:GetChildren()) do
		if v ~= radbrick then
			repeat wait()
				v.BrickColor = BrickColor.Random()
			until v.BrickColor ~= radcolor
		end
	end
	wait(15)
	for i,v in pairs(game.Players:GetPlayers()) do
		if v:FindFirstChild("TouchedColor") then
			if v.TouchedColor.Value ~= radcolor then
				if v.Character then
					v.Character:BreakJoints()
				end
			end
		end
	end
end

What? How is that related to my question wdym

This script is an example of how the minigame would work. You can reference it if you have any troubles with your script.

Did you read my question? I already made the minigame script, I just need to make it so theres a gui that shows a color, and that color coresponds to the chosen color of the main script

How to convert a BrickColor value to a Color3 value? - Scripting Support - DevForum | Roblox

If that’s your problem this topic may help you, since the colors you’re choosing are brick colors.

1 Like

I know how to do that, but its not working correctly

:man_facepalming: I forgot I’m working in a place with team create. I hate drafts.

ColourConsumerReproCommitted.rbxl (31.2 KB)

1 Like
local ChosenColor = BrickColor.new(BrickColors[math.random(1, #BrickColors)])
Box.BackgroundColor3 = ChosenColor.Color

Try this

Yeah I already did that, doesnt work but its okay I think its more complicated

No, because I just tested it in studio and it works.
Baseplate - Roblox Studio - Gyazo

local Box = script.Parent

local BrickColors = {"Really red","Deep orange","New Yeller","Dark blue","Hot pink","Reddish Brown","Lime green","Magenta"}

local ChosenColor = BrickColor.new(BrickColors[math.random(1, #BrickColors)])
print(ChosenColor.Color)

workspace.Part.BillboardGui.Box.BackgroundColor3 = ChosenColor.Color

Hm it prints and everything, just doesnt actually change the color, do you know why that is?

It’s because you’re not adding a BrickColor.new() around it. You’re literally trying to get ‘Color’ from a string.

…?

It waits 5 seconds before sending colour data to the client. If it doesn’t work, then I have to reiterate that just telling me it doesn’t do something isn’t sufficient enough information. I need details, like anything you see in the output or some basic debugging you’ve done.

Not for me, thats really strange hm

If the code provided isn’t working then you have another issue which could be an engine bug. I already showed from the gif I sent that it works 100%.

Im not talking to you, im talking to the other person, your script might work but its not ideal

You’re trying to get Color from a string?.. How is that ideal

I’m not entirely sure how believable it is that it’s not working for you and it is for me, but just in case I’ve made a second repro that loops the colour selection and palette display so that you don’t have to keep starting new test sessions to check if the colour ever changes.

This feels like a simple problem that’s been dragged out one too many posts.

ColourConsumerSteppedRepro.rbxl (31.2 KB)

1 Like

Hm still doesnt work Ive been trying to fix it this is weird

Edit: It works in my own game! Just not in yours for some reason, thank you for all the help hopefully this is the end of this thread, sorry for stretching it out so much