im trying to make a system where it checks for clones in buttons in the player’s gui and destroys that clone when it sees one, but im worried that exploiters will destroy or disable the script and then they can clone the buttons,
so how can i make a system where when the script gets disabled it enables itself, and if it gets destroyed it appears back
any help will be appreciated
btw i have seen a similar topic on the dev forum and the answer was:
task.spawn(function()
local clone = script:Clone()
local old_parent = script.Parent
while task.wait(.1) do
if not script.Parent then
local new = clone:Clone()
new.Parent = old_parent
break
elseif script.Disabled then
script.Disabled = false
break
end
end
end)
then what do you reccomend because i have a building system, where if the player presses a button it makes a transparent model follow the player mouse until he clicks and places it in the server, i cant make it server sided because i want it to be only seen by the player who clicked it