Need help on keeping glitchers out of an area not permitted to them

I’m recently working on a game pass, and it is released. However, people are somehow getting into the area by glitching. Is there a script to prevent them from getting into the area and only allow people with the game pass to get in? I’ve been searching for tutorials but there only for GUI game passes.

Write a script that check player when go in a place use TouchedEvent and chck the play if they have gamepass

You might be able to do this with Zone+ if you’re willing to use an open-source resource. It uses Region3 and Raycasting, and is therefore more reliable than using .Touched. This article has some code examples: Zone+ v1 (deprecated) | Retrieving players within an area/zone

2 Likes

I saw. Though Im looking for a “door” that detects if they have a gamepass or not. If they were to have it the door would open for them. Though if a user without the gamepass tries to go through. It would damage them fully with 100 damage. A lot of users have the time to glitch in so I need a quick and easy fix and to stop them from coming in so easily.

2 Likes

I mean, an exploiter can just noclip into the zone and avoid the door entirley :man_shrugging:.

Zone+ can help combat this by raycasting below and detecting if they’re in the zone, if met requirements, keep them in, if not, oof them.

The door part can just be a simple check if they have things and if they do, cancollide false, but for preventing peeps from getting within the zone, you can use Zone+.

2 Likes

Is there any tutorials on how to use Zone+ like a video?

Hmm, maybe try collision groups? If you’re not looking for that, you could also try opening the door for the local player, but as @3rdhoan123 said, it’s very vulnerable to exploiters. You could do something with remote events by putting the game pass room in ServerStorage and then pass it as an argument with a RemoteEvent with :FireClient(), though, I’m not 100% sure if it would work. I think you should incorporate Zone+ though as an exploit prevention system.

2 Likes

I saw the model for Zone+. Which was this link I believe Zone+ - Roblox. Though I don’t understand on how to setup this. There’s no directions in the script. This is for a gamepass as well.

2 Likes

Look under “Theory” in here: Zone+ v1 (deprecated) | Retrieving players within an area/zone
It contains a rough tutorial on how to create the boundary.

Here’s something that should work in your case:

local ZonePlus = require(4664437268)
local ZoneService = require(ZonePlus.ZoneService)
local group = workspace.ShopGUI.ShopRegion
local zone = ZoneService:createZone("ZoneName", group, 15)
local MPS = game:GetService("MarketplaceService")

zone.playerAdded:Connect(function(player) -- returns the player instance, not the character instance.
    if MPS:UserOwnsGamepassAsync(--[[your gamepass id]], player.UserId) then
        --do stuff if they own it
    else
        --do stuff if they don't own it
    end
end)

zone:initLoop()
4 Likes

Awesome. Is this in the Zone+ model? Or do I have to copy and paste this into the script? Also is there any video on how to setup the Zone+ or is it only text and images. The only thing I change in the script that you gave me is the part where it says (your gamepass id)?

This should be its own script. The require(4664437268) gets the Zone+ module.

You can add things to do if a player does or doesn’t own the gamepass, that’s where the comments are, just replace them. You can add or remove some things if you want, what did you want to modify?

I wanted to make a Zone where only game pass users could get in. I’m currently in the module, or script for Zone+. Should I add anything or keep it how it is and change the gamepass ID. Or do I have to add that part in.

There’s also this part as well.

Those are some of the functions you can use.

Which of the functions are related to what I would need. Or do I have to add the function myself.

2 Likes

The playerAdded one should work. The code sample I’ve provided should work. You could also use playerRemoving if you want the door to close when the player leaves.

That doesn’t work. Stuff in ServerStorage doesn’t exist on the clients’ machines.

5 Likes

I knew that, but couldn’t they move it to replicatedstorage or something, and then fire it, and then after that move it back to serverstorage?

You might be able to do that with server script.

2 Likes

Just make a part and make it fit the whole area and set CanCollide to false and Transparency to 1 thne insert a script and used the .Touched event to check if someone is touching it check if it is a player then if it is check if they don’t own the gamepass if they don’t then teleport them out using the HumanoidRootPart or Torso.

2 Likes