I don't know how to prevent everyone from being revived. I just only wanted that person who is getting affected to be affected.
https://www.youtube.com/watch?v=z8dopZLAB04 - Video on the problem
local ProximityPromptService = game:GetService("ProximityPromptService")
local DownedHumanoidRootPart = script.Parent.Parent
local Character = DownedHumanoidRootPart.Parent
local Revived = Character.Humanoid:LoadAnimation(script.Revived)
local Debries = game:GetService("Debris")
local ServerStorage = game.ServerStorage
local Reviving
local SoundClone
local GotRevived
local function onPromptHoldBegan(_, player)
Reviving = player.Character:WaitForChild("Humanoid"):LoadAnimation(script.RevivingPlayer)
if player.Character.Status.IsDowned.Value == false then
player.Character:WaitForChild("Humanoid").WalkSpeed -= 16
player.Character:WaitForChild("Humanoid").JumpPower -= 50
player.Character:WaitForChild("Status"):WaitForChild("IsReviving").Value = true
Reviving:Play()
SoundClone = ServerStorage:WaitForChild("Downed"):WaitForChild("VoiceLines"):WaitForChild("RevivingPlayer"):WaitForChild("Reviving"..math.random(1,8)):Clone()
SoundClone.Parent = DownedHumanoidRootPart
SoundClone:Play()
-- Model weld code (doing this to save space)
Stim:WaitForChild("Grip"):WaitForChild("ReviveSound"):Play()
Character.Status.BeingRevived.Value = true
DownedHumanoidRootPart:WaitForChild("ReviveIcon"):WaitForChild("ImageLabel").ImageColor3 = Color3.new(255, 255, 255)
end
end

1 comment
Thing is that I want others to be revived, not specific players. The video I showed shows that everyone being revived even tho I only targeted one player