Are the tools that you want to get back, available to anyone who plays?
@lilmazen1234 also, how is the TouchEnded unreliable?
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
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
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)
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)