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

How to make it so when someone hacks it prints something and makes Filtering true?

Asked by 10 years ago

I am trying to make a script where the workspace is changed, this will happen...

-- Trying out my own no exploits script... hope it works ;_;

workspace.FilteringEnabled = true

workspace.Changed:connect(function()
    local m = Instance.new("Message", workspace)
    m.Text = "Someone is currently trying to hack or exploit. If you know who, please report and tell raystriker6707."
    m:remove() -- I forgot if it was m.Text or just m
    while workspace.FilteringEnabled == true do
        workspace.FilteringEnabled = true
    end
end)

one problem I am having is making the message appear on all the people screens. Is there a way to fix it or is my script ok?

1 answer

Log in to vote
1
Answered by 10 years ago

First, it's m:Destroy(). Remove() is the older way to remove objects, use Destroy. Second, you need to add a wait before line 8 so that the message appears. Third, you don't need the while loop at line 10.

-- Trying out my own no exploits script... hope it works ;_;

Workspace.FilteringEnabled = true

Workspace.Changed:connect(function()
    local m = Instance.new("Message", Workspace)
    m.Text = "Someone is currently trying to hack or exploit. If you know who, please report and tell raystriker6707."
    wait(3) --Change 3 to how long the message shows.
    m:Destroy() --Remove is old, use Destroy.
end)

Also, I don't know if checking that the Workspace is changed will be very efficient to catch exploiters. Setting FilteringEnabled to true in your game without this script is probably the better option.

1
Well, in this case, If you clone something and put it in the workspace, you'll have this message pop up.. fahmisack123 385 — 10y
0
Exactly. Spongocardo 1991 — 10y
Ad

Answer this question