Not related to this resource, you inserted a virus.
I think this is going to help me with my random weapon spawning system! very cool resource!!
So, this is just a better version of Touched event right?
Not at all? If you read the thread you would see itâs for spatial areas.
Oh, that make sense. Thx for the info :>
Check in here to receive new messages.
How could I possibly ignore certain parts when using :getRandomPoint()
, which returns a Vector3 value and a table with touching parts. I have multiple zone parts touching each other but I want them to be ignored in the table.
Support for this was introduced in a recent update, so first try updating your module, then if it persists can you provide more details here again.
You can achieve this with item:track(item)
and the zone.itemEntered
and zone.itemExited
events. More details here:
I can look into this thanks for the report!
Have you tried splitting your zones into further zones?
What do you mean? I got multiple parts for my zone as it doesnât have a perfect shape.
This is what it looks like with my zone so far, Iâm using this to spawn gems. I simply want to check if something is touching where the random location was, as I donât want them to spawn in stuff.
Is this base of checking contaction every frame?
im trying to use the :destroy() function on the zone module but it gives me the error: âattempt to index nil with âdestroyââ on line 870
Does partEntered event count also VehicleSeat? If not, how I can detect it with ZonePlus when a VehicleSeat enter in the zone?
I would like to detect if a VehicleSeat enter in the zone.
Hey, could you hep me out with implementing itemEntered/itemExited? On the docs it says:
zone.itemEntered:Connect(function(item)
print(("item '%s' entered the zone!"):format(item.Name))
end)
But that code doesnât run, and Iâm guessing items are set up differently but I couldnât find any info on that. However, using partEntered/partExited works with that same code (changed event names) so Iâm a bit confused here.
Thanks!
Hey, this is probably an issue due to my coding, but I have a problem where resetting itemEntered doesnât work.
This code is in a module on the client and is ran when a part is made
--Using the Zone+ module to detect when something enters the hitbox
local hitbox = Zone.new(part)
--track anythhing that has a humanoidrootpat
for _,v in pairs(workspace:GetChildren()) do
if v:FindFirstChild("HumanoidRootPart") then
hitbox:trackItem(v)
end
end
--detects when the tracked item entered
hitbox.itemEntered:Connect(function(Target)
warn("Hit")
part.Color = Color3.fromRGB(170, 0, 255)
outline.Color3 = part.Color
Hit:FireServer(Target)
end)
Because when the NPC resets, the new characterâs humanoid isnât the one being tracked.
Please rename the module instance here to MainModule, I want to require by ID so that I donât have to worry about updating the module!
I tried this but itâs really laggy
Requiring via ID is discouraged, it yields your script, you lose intelissense (afaik), and itâs just not a good thing.
Him doing that would also mean that he wouldnât be able to be agressive with API changes that break backwards compatibility without creating another model.
It would also mean that he could change something and it would break your game accidentally.
IIRC, TopBar v1 had ID requiring support, but that was dropped in V2, and I can understand why, since itâs a bad practice. I believe he wouldnât go back and start supporting it.
Well, donât worry about that. Update if anything breaks, or periodically with all the libraries you use. Iâm an update freak but yeah I donât see it being much of an issue.
Edit: you can also have notifications on GitHub releases on his repo, so youâll know if anything important gets fixed
I have some problems with localPlayerEntered event it doesnât fire.
local zonemod = require(game.ReplicatedStorage.Zone)
local Zone = zonemod.new(workspace.TESTZONE)
Zone.localPlayerEntered:Connect(function()
print("hitt")
end)
Thatâs an amazing module
Its really useful and reliable