Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How can I check to see if the workspace is being edited?

Asked by 8 years ago
Edited 8 years ago

I don't want people to be able to edit the workspace (By this I mean ingame, and by exploiters). How could I go about this?

Possible code:

01previousWorkspace = {}
02newWorkspace = {}
03 
04function checkWorkspace()
05    for i,v in pairs(workspace:GetChildren()) do
06        table.insert(previousWorkspace, v.Name)
07    end
08end
09 
10function compare()
11    for i,v in pairs(previousWorkspace) do
12        for ii,vv in pairs(newWorkspace) do
13            if v == vv then
14                return true
15            end
View all 26 lines...

Please help! I DO NOT WANT TO USE FE!!!

0
Just use FilteringEnabled and then any exploits they may make won't matter. Perci1 4988 — 8y
0
Click on Workspace and change the property of FilteringEnabled to True. Turning it on will stop over 90% of the hackers. (You might have to change some of the codes to work with FE restrictions) iamnoamesa 674 — 8y
0
No FE, please! AstrealDev 728 — 8y
0
What's wrong with FE? Better learn how to use it first than to have to re-learn everything. Link150 1355 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Well you could do this:

01previousWorkspace = {}
02newWorkspace = {}
03 
04function checkWorkspace()
05    for i,v in pairs(workspace:GetChildren()) do
06        table.insert(previousWorkspace, v.Name)
07    end
08end
09 
10game.Workspace.ChildAdded:connect(function() -- If something was added to the workspace
11    for i,v in pairs(previousWorkspace) do
12        for ii,vv in pairs(newWorkspace) do
13            if v == vv then
14                return true
15        else
View all 33 lines...

I mean this could be one way to go about it. This isn't the best way to go about this but, I do hope it kind of pointed you in the right direction.

Ad

Answer this question