LocalPlayer on Server

If your end goal is to make it disapear only for the player that touches it simply use a LocalScript, exploiters will find a way to make it disapear either way so at that point you can add magnitude checks on the server or some sort of protection on the SERVER along with having the client side code, If you want a somewhat more in detail explanation or example lmk and I’ll try to help :smiley:

1 Like

Can you provide further details?

So you want to destroy a part with an animation for only one player?

I’ve already written the script, I just want to know if it can be done with server scripts in any way.

You can check on the server If a player touches the part and then you could fire a remote event on the client that is handled in a local script and this local script destroys the part locally, and you can have aditonal checks on the server such as magnitude etc,

Doing it on the server is unnecessary and will cause lag, you should always animate things on the client.

How do I create magnitude checks?

This video by TheDevKing can help you out! Click Here

And how exactly does checking the part distance help? Apart from detecting DarkDex users moving blocks

Sorry I haven’t been scripting for awhile

Your meant to be checking the distance between the part and the player and or, checking if they TPed so they cant Just exploit to the part, theres not really a way to prevent them deleting parts, but It should somewhat prevent some stuff.

No no this isn’t what I meant.

I just wanted ways to stop people from being able to read my code, I don’t really care about deleting/teleporting.

The script was a CFrame animation that took ages to code, and I do not want someone to be able to gain access with just the simple click of a button.

Well you can’t really do that on the client, unless you want to pay for a obfuscator such as luraph or something.

Luraph wouldn’t work anyway as it’s a Lua obfuscator, Roblox’s lua is different. It would keep trying to use unknown variables (e.g. _ENV) and would probably end up making the script way too long and way too laggy.

You could try using simple bytecode but other than that theres not really a way to prevent people decompiling your script, unless you have a “anti-decompile” method which some people do have But im not sure how to make it myself,

Is that a stolen script?

Not sure what you mean… is what a stolen script?

The sscript you just posted, it’s literally decompiled (stolen).

1.No, a very low quality version was given by a user called WanyaBennyYT and I recoded the CFrames because it was too blocky.

2.They used an obfuscator which renamed the variables to try and encrypt it, which isn’t very good, being the reason I made this post in the first place

I haven’t used any exploits/decompilers since 2020.
I’m not sure how you can look at a simple localplayer on touch script with unclear variables and immediately go ‘THATS STOLEN’.

1 Like

Every decompiled script looks like that lmao

1 Like