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:
01 | previousWorkspace = { } |
02 | newWorkspace = { } |
03 |
04 | function checkWorkspace() |
05 | for i,v in pairs (workspace:GetChildren()) do |
06 | table.insert(previousWorkspace, v.Name) |
07 | end |
08 | end |
09 |
10 | function 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 |
Please help! I DO NOT WANT TO USE FE!!!
Well you could do this:
01 | previousWorkspace = { } |
02 | newWorkspace = { } |
03 |
04 | function checkWorkspace() |
05 | for i,v in pairs (workspace:GetChildren()) do |
06 | table.insert(previousWorkspace, v.Name) |
07 | end |
08 | end |
09 |
10 | game.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 |
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.