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

Trying To patch a sound hack?? [closed]

Asked by 8 years ago

This question already has an answer here:

Trying To patch a sound hack??

Im trying to make it were if someone adds a sound to the workspace that was not added to the game but was hack in it will stop or remove or destroy this what i have so far but it's not working can someone please help me?

workspace.ChildAdded:connect(function(l) if l:IsA('Sound') then l:Stop() l:Destroy() end end)

1
Your primary solution should be to enable FilteringEnabled (See: http://wiki.roblox.com/index.php?title=Client-Server_Model_and_FilteringEnabled). This stops any client-sided change from replicating to other players. ScriptGuider 5640 — 8y

Marked as Duplicate by Goulstem

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

2 answers

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
8 years ago
Edited 8 years ago

Theres nothing wrong with this, however, if someone hacks, they won't only inject into workspace, thus you'd have to link the event to every instance in the workspace.

Your issue however is that you're trying to set the parent to nil while something else has set the parent to workspace in the same tick. add a wait() and it should work.

another thing to mention: PlayOnRemove value should be set to false to make sure it wont play.

workspace.ChildAdded:connect(function(Object) 
    wait()
    if Object:IsA('Sound') then 
        Object:Stop() 
        Object.PlayOnRemove = false
        Object:Destroy() 
    end 
end)
0
You should also suggest the use of FilteringEnabled as a primary solution, as it will filter all client-sided exploits used to make changes to the server, so they don't replicate to other users. ScriptGuider 5640 — 8y
0
Thats what you think. People that aren't "Youtube" hackers get around that easily. RubenKan 3615 — 8y
0
YouTube hackers? You're talking about someone with server-side access. Anybody with that level of control, is going to bypass all these little "security tricks" regardless. FilteringEnabled is the most secure way for a user to protect their game for the time being. ScriptGuider 5640 — 8y
Ad
Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

FilteringEnabled

You should want to implement FilteringEnabled for preventing such instances that you're describing. Enabling this property will prevent any change made by the client from replicating to other users. Therefore, if this "hacker" were to add a sound object to the workspace, that change would remain local to them, and the server would not be informed. Any self-made attempt to prevent an exploit should always be your last resort. In this case, FilteringEnabled will get the job done, along with protecting your game from all other client-side exploits.

Remotes

As a side note, enabling FilteringEnabled also changes how the game developer can communicate with the client/server as well. This, however, is no problem at all thanks to remotes. Remotes allow communication between the client and server by way of events and callbacks that the programmer can manipulate. As an alternative to reading about them on the wiki, I also created a video a while back on them here.

0
You can insert anything into your character to bypass filtering enabled, just wanting to let you know. RubenKan 3615 — 8y
0
Then you should use DescendantAdded, not ChildAdded. ScriptGuider 5640 — 8y