How to make a gui visible when near another player?

Title explains it. I have a revive system in my game, and i was wondering how to make a gui visible when i go near a downed player, something like this
(footage from another game)

I just need some suggestions to make a gui visible when near another player, nothing else
Thanks!

any code do you have right now would be useful

Please do not ask people to write enitre scripts or design entire systems for you.

When a player is downed, start looping a check for :GetPartBoundsInRadius()
If a player part is detected, get the player from that character using :GetPlayerFromCharacter()
Then, using a RemoteEvent you can fire the client of the player that has been detected to enable the GUI on their screen.

You could add a tag or set an attribute to the downed player, then you could use a loop in a local script to check if the magnitude between the two players are less than something.

hmm, ok ill try something and ill let you know

RunService...
  if (HRP.Position - Part.Position).Magnitude <= 100 then
     Gui.Visible = true
  end
end)

so i researched :GetPartBoundsInRadius() and implemented it, and i think its safe to say it works nicely, thanks

Props to you for doing research and implementing it yourself successfully.

misclick ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

I wasn’t? I was asking for suggestions

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.