Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

2 comments

1

Well, in this case, If you clone something and put it in the workspace, you'll have this message pop up..

0

Exactly.

This discussion is preserved as it was. New answers, comments, and votes are closed.