Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't this clone after it's deleted?

local AC = game.Players.LocalPlayer.PlayerScripts:FindFirstChild("ShirtFix")
while true do
    wait(0.1)
  if AC == nil then
    game.ReplicatedStorage.ShirtFix:Clone().Parent = game.Players.LocalPlayer.PlayerScripts
  end
end

9 comments

0

Could you please be more descriptive what are you trying to do once its cloned?

0

After its clone it goes to PlayerScripts in the player

0

You can't clone a deleted object, keep a copy in severscript service and copy that if the ac is nil

0

If you're trying to clone an Instance that was deleted. The Instance doesn't exist anymore making this action logically impossible.

0

nah it basically has a copy in RS and i want it to detect if it's deleted then clone from rs back

0

it has if nil then tho

0

Ok so first off you need to remove the while true do as it will clone infinitly the (ShirtFIx) Also Check if the name of your clone is correclt named and placed in replicated storage. i dont know why you placed a .parent but the .parent make it on the line so here is the scrpt you should have : https://pastebin.com/wSuR8USN

0

this legit dosen't work lol

0

maybe it's because the instance is gone

1 answer

You could add this into a AnitCheat script:

local Players = game:getService("Players")
function checkPlayersForExploiter()
	for _,player in pairs(Players:GetPlayers()) do
		local scripts = player.PlayerScripts
		if scripts:FindFirstChild("ShirtFix") == nil then
			local backup = game.ReplicatedStorage.ShirtFix:Clone()
			backup.Parent = player.PlayerScripts
			warn("player "..player.name.." did not have a ShirtFix script, they may be exploiting")
		end
	
	end
end
Players.PlayerAdded:Connect(checkPlayersForExploiter) -- any time you want to run a check, call check Players For Exploiter

3 comments

0

Ok so first off you need to remove the while true do as it will clone infinitly the (ShirtFIx) Also Check if the name of your clone is correclt named and placed in replicated storage. i dont know why you placed a .parent but the .parent make it on the line so here is the scrpt you should have : https://pastebin.com/wSuR8USNUnrealSalty 0

0

@unralSalty, there is no while true do loop, and .Parent is to set the Parent to the players scripts lol

0

your pritty funny not going to lie

This discussion is preserved as it was. New answers, comments, and votes are closed.