Disable tools in one area

Are the tools that you want to get back, available to anyone who plays?

@lilmazen1234 also, how is the TouchEnded unreliable?

Some of the time Touched ended doesn’t work. (Very Unreliable)

A Topic about it (Check the Solution)

It would be better to use Zone Plus as it’s efficient unlike TouchedEnded

1 Like

Zone+ still works but I’d suggest using the spatial query API if you want a more lightweight implementation. Both methods should work well though.

If you want to hide the backpack, then you can do like this

  1. Add a local script into StarterPlayerScripts
    Capture
  2. Paste this code into the local script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HideToolsEvent = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("HideTools")
local StarterGui = game:GetService("StarterGui")

HideToolsEvent.OnClientEvent:Connect(function(Value)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, Value)
end)
  1. Add a folder into ReplicatedStorage and rename it to Remotes
    Capture
  2. Add a remote event into that folder and rename it to HideTools
    Capture
  3. Add in the zone plus module into ReplicatedStorage
    Capture
  4. Add a part into workspace and name it Zone
    Capture
  5. Add a script into ServerScriptService and then paste this code into it
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Zone = require(ReplicatedStorage:WaitForChild("Zone"))
local container = workspace:WaitForChild("Zone")
local zone = Zone.new(container)
local HideToolsEvent = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("HideTools")

zone.playerEntered:Connect(function(player)
	HideToolsEvent:FireClient(player, false) -- Send false to hide the backpack
end)

zone.playerExited:Connect(function(player)
	HideToolsEvent:FireClient(player, true)
end)

and it should work just fine

robloxapp-20220815-2037475.wmv (630.4 KB)

Place file
Zone.rbxl (71.2 KB)

If you need any help with this let me know

It actually worked! Thanks for the help

And thanks to @lilmazen1234 for the info on zoneplus

1 Like