I have a LocalScript that uses :Destroy() on a block when it is touched by the LocalPlayer, so that nobody else will see it happen until they have touched it themselves.
There is a CFrame animation that plays before it gets destroyed, which is why I want to use ServerScripts instead to prevent hackers from being able to gain access to my scripts.
while true do
wait();
if game.Players.LocalPlayer then
break;
end;
end;
local l__LocalPlayer__1 = game.Players.LocalPlayer;
local v2 = game.Workspace.CheckSpawns;
local v3 = true;
for v4, v5 in pairs(v2:GetChildren()) do
local u1 = v3;
v5.Touched:Connect(function(p1)
if p1.Parent == l__LocalPlayer__1.Character and u1 then
u1 = false;
So I was just wondering if there was any way to make it work the same but on the server, using RemoteEvents if truly necessary. To lower the chances of somebody gaining access, as low as physically possible.
I’m not sure what your end goal is but if you want to use .Touched on the server and still get the player who touched it just do this,
local CheckSpawns = game.Workspace.CheckSpawns;
local v3 = true;
for Index, Value in pairs(CheckSpawns:GetChildren()) do
Value.Touched:Connect(function(Hit)
local Player = Players:GetPlayerFromCharacter(Hit.Parent)
if Player and v3 then
u1 = false;
-- rest of the code here
end
end)
end
Just to let you know. That’s worse you’d rather just not want to use RemoteEvent’s if your trying to prevent hackers. Because, if you use remote events they can use those RemoteEvent’s to replicates into the server. So, there is no ultimate way to use RemoteEvent’s in this case. So, either way whatever your trying won’t work. Because remote events can be reversed to do it. But, in the end they can be reversed by a hacker to replicate to the entire server. So, usually you wouldn’t want to use a RemoteEvent if your trying to prevent Hacker’s from hacking it.
Is there at least any way to obfuscate it, like to the point where it’s unreadable? So then they can’t remove the extra security parts I’ve added to the code?
Well, you could try to make firewalls using other websites, or use HTTP Services. It’s safer to use Local Scripts then Remote Events because if you use Remote Events they can use local scripts to replicate what happens in the Local Script to the entire server. The entire server would be server sided which hits everyone at once. Local Scripts only hit a client aka just one computer, or whoever that does it
If you want to obfuscate it try making it link to other websites. Making it link to other websites would help you drastically because, then you can make firewalls, and all sorts of code that they have no clue you’ve made. Which means it’d be safer if you used another website with roblox both, at the same time.
I don’t know for sure. I obfuscate my code, at all you can maybe look up tutorials, or find any on youtube. Because I honestly have no clue if there are, or aren’t.
Can’t the exploiters just read the code and go to the sites? It’s not like only letting me access them will work, because then how will Roblox be able to read it?
Well, if the website is secure enough depending on where you go. They won’t be able to get onto it to disable the security. Here’s the link to the API Key Document: Managing API Keys | Documentation - Roblox Creator Hub.
Well, I do know one website. But, you’d have to create your own custom code to prevent hackers, and all. Because, I don’t know if there’s a tutorial on it. Link: https://console.firebase.google.com/project/fir-demo-project/overview?pli=1. All I know is someone I know used this website to create code to protect their game.