Remote placing objects

  1. What do you want to achieve? I want player to be able to place “objects” on mouse click

  2. What is the issue? The player can exploit the game when using remotes to place objects

  3. What solutions have you tried so far? Trying to use server script to handle it, didn’t work/don’t know how

local player = game.Players.LocalPlayer
local background = script.Parent.Background
local GUI = script.Parent
local buttons = {}
local isBuilding = false
local buildButton = GUI.BuildButton

for _,v in pairs(script.Parent.Background.Slider:GetChildren()) do
	if v:IsA("ImageButton") then
		table.insert(buttons, v)
	end
end

buildButton.MouseButton1Up:Connect(function()
	isBuilding = not isBuilding
	background.Visible = isBuilding
end)
--This is the only code i have so far

What objects are they gonna place?
is there a condition before placing the object (requires money , crafting materials , etc )?
is there a limit to how much a player can place?

Objects like: Walls, Machines, “Droppers” etc.
Yes, it requires money and it requires the wall to be placed on player’s Plot
There’s no limit, but it can’t be inside another object and can’t touch anything, there’s only a plot size limit, so the object must fit inside the plot

As a general rule of using Remote Events you should only check for the conditions on the server by sending a request from the client and validating it on the server