This one was made before but my on answers doesn’t exist because the other topic he never set any parent but in here I have set parent but still getting this weird error, can anyone help me?
The script is basically copying the guns that was recieved from remote events with string and blah blah, then clone guns from server storage into fakebackpack, like everything is working and it often works but sometimes this error appears can anyone help?
game.ReplicatedStorage.Events.ClassHandler.OnServerEvent:Connect(function(player, S , Z, C, Safe)
if Safe.Parent:IsA("TextButton") and Safe.Parent.Parent.Parent.Parent.Name == "LobbyCamera(Desktop)" and Safe.Parent.Parent.Parent.Parent:IsA("ScreenGui") then
local classes = game.ServerStorage:WaitForChild("Guns").Classes
for _,v in pairs(classes:GetChildren()) do
if v:FindFirstChild(S) then
classes1 = v:FindFirstChild(S)
end
if v:FindFirstChild(Z) then
classes2 = v:FindFirstChild(Z)
end
if v:FindFirstChild(C) then
classes3 = v:FindFirstChild(C)
end
end
if classes1:IsA("Tool") and classes2:IsA("Tool")and classes3:IsA("Tool") then
classes1:Clone()
classes2:Clone()
classes3:Clone()
fakes = player:FindFirstChild("FakeBackpack")
if fakes then
fakes:ClearAllChildren()
wait(2)
classes1.Parent = fakes
classes2.Parent = fakes
classes3.Parent = fakes
player.PlayerGui["LobbyCamera(Desktop)"].Booleans.HasClass.Value = true
warn("Changed")
else
local Fake = Instance.new("Folder", player)
Fake.Name = "FakeBackpack"
classes1.Parent = Fake
classes2.Parent = Fake
classes3.Parent = Fake
player.PlayerGui["LobbyCamera(Desktop)"].Booleans.HasClass.Value = true
warn("I mean, it should be changed u know")
end
end
else
player:Kick("Go exploit some where else noob")
end
end)