I made some blocks that give players a boost using the
.Touched event. But it is not reliable(for example, I can walk on blocks and it doesn’t give me any effects). Is there any other way?
(I don’t want to use
Region3 cause there are a lot of blocks.)
I think you need to be a bit more specific on what you are trying to achieve.
And possibily some information and screen-shots of what you want.
maybe you are using the event wrong?
or perhaps it’s running infinite amount of times?
April 24, 2020, 2:44pm
You could use the
.Touched event don’t work probably. For example, I could walk on the block and it wouldn’t give me any effects
Are you detecting your character properly?
maybe it’s detecting a part other than your character.
Yes, I am. I used an if statement to check if that is a player.
How to use them? I haven’t heard of that before.
Are you using it as:
-- Touch event
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
GetTouchingParts() basically returns an array of all the parts its touching.
Note - Both part must be canCollided
Also you can use a combination of
(30 chars is amazing. Thanks Roblox.)
I thought about the combination but yet again, I can still walk on blocks and don’t have any effects.
Can you post your script please?
if game.Players:GetPlayerFromCharacter(hit.Parent) then
hit.Parent.Humanoid.Health = 0
This might help you out:
v1 is outdated and unsupported, we highly recommend users checkout the greatly improved v2 instead:
v1 (outdated)ZonePlus v1
<a href="https://1foreverhd.github.io/HDAdmin/projects/zoneplus/about/" rel="noopener nofollow ugc">[Zone banner]</a>
Zone+ is a lightweight application that utilises regions and raycasting to efficiently determine players within an area.
It uses a combination of Region3 and Raycasting to check when a player enters a ‘zone’.
local touchParts = your.group.of.blocks
local zone = Zone.new(touchParts)
-- give boost
-- remove boost
Thats pretty weird, I just tested it and it worked. Are you sure this code is inside a server script?
my advice is to look into Region3 it requires a little more work but it runs very well for me and almost no lag.
You can use
.Magnitude, the distance in studs between 2 objects, or
:GetToucingParts(), which returns an array on the parts that intersect with the part.
Can I group all the blocks to do that or I have to do it for every single blocks?