Blocks Placement System to Grid Remastered

So you want to make a system, where colors of blocks are exclusive to a specific client. Here is a general idea how to do that:

  1. Edit the server script of the tool so it inserts an object value to the block. The instance should hold a value of a player who placed the block.
  2. Make a client sided script in starter player scripts detecting placed blocks. The script checks if the object value’s value is equal to local player. If that’s true - change the color of the added child (block) to a desired color.

I hope that I understood you correctly. If I am wrong or you still need help, let me know.

So does this make it so that, if player one has red selected and player 2 has blue, and they both placed a block, its their corresponding color?

What I said can be used to make something like that:

  • Player1 sees his block as blue blocks and sees Player2’s blocks as red blocks.
  • Player2 sees his blocks as blue blocks and sees Player1’s blocks as red blocks.

Edit: I was not precise enough in my previous reply, I did not specify how to color enemy’s blocks but you might have an idea how to do that after I partially answered the question.

I want them to see the same colors

as a matter of fact, see me in game, ill demonstrate my problem

nvm, My problem is that if a player selects a color, that color will be everyone’s. And i want them to have their own color pallete while also seeing other’s color

Does it mean that if someone chooses green color, everyone else will be placing green blocks?

Apologize for late reply but I was focused on my work.

Yes and thats the problem here, i don’t want that. i want it so that if someone picks a color, that color will be changed to them only, not everyone

Give me access to the game so I will figure this out. After doing that I will explain why it was like that and how I fixed that.

its uncopylocked, see if it is

1 Like

I assume that you will leave it uncopylocked as long as this problem remains unsolved (so I do not have to download it now). I will do my best to fix it tomorrow.

alright, thanks for helping me actually

I came up with a solution to the problem. Follow these steps:

  1. In ReplicatedStorage there are two instances named ChangeColor and ChangeMaterial. Move these objects to StarterPack
  2. Open the server script called Script in Place blocks tool and replace the code with this:
local ChangeColor = script:FindFirstAncestorOfClass("Player").Backpack:WaitForChild("ChangeColor")
local tool = script.Parent
local ChangeMaterial = script:FindFirstAncestorOfClass("Player").Backpack:WaitForChild("ChangeMaterial")

ChangeColor.OnServerEvent:Connect(function(player, requestedColor)
	tool:SetAttribute("Color", requestedColor)
end)


ChangeMaterial.OnServerEvent:Connect(function(player, requestedMaterials)
	tool:SetAttribute("Material", requestedMaterials)
end)
  1. Go to PaletteScript client script and replace your code with this:
-- Made by denkodin (https://www.roblox.com/users/342156146/profile)
-- YouTube channel: https://www.youtube.com/c/H2MinRobloxStudio

local frame = script.Parent
local template = frame.Template:Clone()
local player = game:GetService("Players").LocalPlayer
local color = player.Color.Color
local ChangeColor = game:GetService("Players").LocalPlayer:WaitForChild("Backpack"):WaitForChild("ChangeColor")

frame.Template:Remove()

function OnColorButtonClick(h, s, v)
	color.Value = Color3.fromHSV(h, s, v)
end

for x = 0, 12 do
	for y = 0, 8 do
		local color_button = template:Clone()
		color_button.Name = "ColorButton[" .. x .. "," .. y .. "]"
		color_button.Parent = frame
		color_button.Position = UDim2.new(x * color_button.Size.X.Scale + x * 0.004, 0, y * color_button.Size.Y.Scale
			+ y * 0.004, 0)
		local h, s, v = 0, 0, 0
		if x < 12 then
			h = x * 30 / 360
			s = y < 4 and 1 or (1 - (y - 4) * 20 / 100)
			v = y > 4 and 1 or ((y + 1) * 20 / 100)
		else
			h, s = 0, 0
			v = y * 12.5 / 100
		end
		color_button.Color.BackgroundColor3 = Color3.fromHSV(h, s, v)
		
		color_button.MouseButton1Down:Connect(function()
			OnColorButtonClick(h, s, v)
			ChangeColor:FireServer(color.Value)
		end)
	end
end
  1. Open Find All / Replace All tool in VIEW section:
  2. Use the opened tool to replace this in every script:
    game:GetService("ReplicatedStorage"):WaitForChild("ChangeMaterial")
    With this:
    game:GetService("Players").LocalPlayer:WaitForChild("Backpack"):WaitForChild("ChangeMaterial")

That is all. After following these steps it should work as intended. The problem is the fact that every client was firing the same remote events making it so every server script with this event received the signal. To fix it I made it so every client has his own exclusive remove events. I do not know how to put it in nice words but I hope that you understand what I mean and it will help you in the future. Have a nice day.

thank you so much. like actually bro, thank you from the bottom of my heart

1 Like

is there anyway i can help you, like a donation?

Just be happy. That is enough. I am glad that I can bring joy to this platform. If you want to donate Robux, you can do this in one of my games: Super Tic Tac Toe - Roblox

how can i change the size? of the blocks

1 Like

I was looking for something like this just earlier prefect time! Anyways is there a block/grid attribute yet?

1 Like

There is no feature in this system. Your question gave me an idea to make an update to this system to make customizable size of the blocks.