Delete Item From UI

It doesn’t matter, this is a case of where someone who doesn’t know any better might not notice a problem like this. Finished product or not, you shouldn’t be giving out advice which will be a problem in the long term, if not changed(which probably wouldn’t have happened if no one pointed it out). The least you could have done was to state the fact that it is not secure.

1 Like

If you really want to be helpful, try to fix the issue as I am doing so?
Got any idea how to fix the protection lack?

Thank you for your help, I modified the script slightly, and it works as intended.

1 Like

Rather concerned about this, any way to fix this issue?

Here’s a sanity check, there shouldn’t be any security problem anymore.

Local script:

local RemoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("RemoteEvent")

script.Parent.MouseButton1Click:Connect(function(player)
	for Index, Part in ipairs(workspace.Aircraft:GetDescendants()) do
		RemoteEvent:FireServer(Part)
	end
end)

Sever script:

local RemoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("RemoteEvent")

RemoteEvent.OnServerEvent:Connect(function(PlayerClient, Part))
    if Part.Name == PlayerClient.Name then
          Part:Destroy()
    end
end)

Edit: accidentally pressed send lol I’m on mobile

2 Likes

Why are you getting mad when I am pointing out a serious flaw with your code? I don’t think you quite understand the magnitude of the flaw. It allows you to remove all parts in workspace, kick all players. It allows you to essentially lock the game.

Either way, to fix it, you could define the part you want to remove on the server, which makes sure the only part you can remove is the one you are supposed to. Alternatively, if there are multiple parts that need to be removed, you can send a string identifier in the remote event, instead of the Part/Model instance.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.