i have been making a game,and i just noticed i get all these things such as
and i cant find were to delete,Any help
i have been making a game,and i just noticed i get all these things such as
There could be a script hidden inside of a part that’s in a free model, or so fourth.
You could use recursion to search for the culprit: (although this will destroy all the scripts in your game.)
local function recurse(x)
for I,v in pairs(x:GetChildren()) do
if x:IsA("Script") then
x:Destroy()
end
if #x:GetChildren() > 0 then
recurse(v)
end
end
recurse(game.Workspace)
Ty,i have inserted 1 script inside my game
if you want join me
Can i just insert this in a local script in workspace
Server script service would be the best place to put it.
I don’t recommend to put free models at all if except if they endorsed!(Having a small badge on it which is approved by ROBLOX) You need to have at least some basic knowledge for scripting to detect viruses and free models worthless scripts! Thank you for reading this!
local function recurse(x)
for I,v in pairs(x:GetDescendants()) do
if x:IsA("Script") or x:IsA("LocalScript") then
x:Destroy()
end
if #x:GetDescendants() > 0 then
recurse(v)
end
end
recurse(game.Workspace)
just search for ‘script’ in the explorer
The problem with that script is that it might be inside the parent’s child which needs a lot of loop tables. I’d recommend to screenshot us the explorer tab to see ourselves!
Test it for yourself!
Why do you even need a script inside the spawn in first place? There’s no teams or anything requiring it, have you attempted to remove the script and see if that works?
This code needs to be in a ‘script’ if it is in ServerScriptService and not a LocalScript.
Thank you it worked,i think one of my friends was in team create and inserted a free model
No problem, just be careful in the future when inserting and sort of free models. Make sure you mark one of these reply’s as solved.