@phxntxsmic is right, you should attempt to do something before posting here. However, I kinda want to help you, so i am going to show you how to get the distance between one player and another.
(you will have to code everything else, however.)
There is a thing called magnitude which is basically distance as far as I know. You could get the magnitude between two character's HumanoidRootPart, which I like to get with "Character.PrimaryPart":
local function GetDistance(plrOne, plrTwo)
local characterOne = workspace:FindFirstChild(plrOne.Name)
local characterTwo = workspace:FindFirstChild(plrTwo.Name)
if not characterOne or not characterTwo then return end
local distance = (characterOne.PrimaryPart.Position - characterTwo.PrimaryPart.Position).Magnitude
return distance
end
local playerDistance = GetDistance(Killer, Victim)
Keep in mind I haven't tested this, this is just a quick lesson.
3 comments
This is not a request site. Please look at the community guidelines before posting a question: https://scriptinghelpers.org/help/community-guidelines
i- didnt make a request...
I see you edited your post. Previously, you mentioned us giving you a GUI and telling you where to put it, which is literally a request. I understand that you realized you made a mistake and tried to fix it, which is good, although that doesn't mean you never made the mistake.