i am trying to get a proximity prompt to appear on their torso
The proximity prompt is local, and the script is serversided
local humanoid = script.Parent:WaitForChild("Humanoid")
local hrp = script.Parent:WaitForChild("HumanoidRootPart")
humanoid.BreakJointsOnDeath = false
humanoid.HealthChanged:Connect(function(hp)
if hp == 0 then
game.Players:GetPlayerFromCharacter(humanoid.Parent).Backpack:ClearAllChildren()
prox = Instance.new("ProximityPrompt")
prox.HoldDuration = 7
prox.MaxActivationDistance = 5
prox.ActionText = "Revive"
prox.Parent = hrp
revscript = script.revive
revscript.Parent = script.Parent
revscript.Enabled = true
script:Destroy()
end
end)