I have a game with a safe zone and a zone where players can battle. I want to make it so players have infinite health in the safe zone and back to normal health in the battle zone. But I have had so many problems and I just can't seem to figure out how to do this.

I don't want to use a Touched event on an invisible brick as this is too easily exploitable. I tried using Region3s, but I keep getting an error and I've asked twice here and no one seems to know how to help me, basically one region3 is working and the other doesnt work ever.

The only other solution I know of is raycasting and I don't think that's the right thing to use for checking positions. Any assistance please?

6 comments

1

If it's a basic box zone, wouldn't it be possible to just check that each coordinate of the character's torso is within the box? Connect a change event to a character's humanoid on spawn which sets their health to full if their torso is within certain coordinates?

0

Why don't detect player touches an object?

0

Checking coordinates and seeing whether a player is within them or not always confused me (I only know how to semi do this with regions)

1

if ((torso.x > 100 and torso.x < 200) and (torso.y > 100 and torso.y < 200) and (torso.z > 100 and torso.z < 200)) then would check that the player's torso is within a 100x100x100 box with origin (100, 100, 100).

0

also store your real health within a diffrent value then change it to infinity and then when they leave change it to your stored value

0

Thank you!