Trying to make a glory kill system

I’ve been trying to really understand the aspect of producing glory kills with a system I’ve looked and researched for about a week, and got nothing I recently got back into scripting and i’m trying not to use any free models and my idea is that so when the player gets another player to a certain amount of health they are able to be killed using a glory kill they have equipped, so far I’ve only implemented a proximity prompt and the activation I currently have a decent understanding of coding and would love help understanding how this is possible.

local:

local char = script.Parent
local humanoid = char.Humanoid
local player = game.Players.LocalPlayer
local prompt = char.Torso.Finisher
local stagger = char.Torso.Stagger
local event = game.ReplicatedStorage:FindFirstChild("Stagger")
local finishertriggered = char.Torso:FindFirstChild("FInished")
local startergui = game:GetService("StarterGui")

stagger = false
finishertriggered = false

if char.Humanoid.Health > 15 then
	stagger = true
	event:FireServer()
	if stagger == true then
		prompt.Enabled = false
		wait(10)
		if finishertriggered == true and stagger == true then
			humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
			humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)
			startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
			
		end
		finishertriggered = false
		elseif finishertriggered == false then
		stagger = false
		prompt.Enabled = false
	end
end

Server Sided:

local char = script.Parent
local humanoid = char.Humanoid
local player = game.Players.LocalPlayer
local prompt = char.Torso.Finisher
local stagger = char.Torso.Stagger
local event = game.ReplicatedStorage:FindFirstChild("Stagger")


event.OnServerEvent:Connect(function()
	if char.Humanoid.Health > 15 then
		stagger = true
		wait(1)
	if stagger == true then
		
		prompt.Enabled = true
		
		prompt.Triggered:Connect(function(player)
			print(player)
		end)
		
	elseif stagger == false then
		prompt.Enabled = true
	end
end
end)

hi, didn’t really get the question - what exactly are you trying to do currently? are you struggling with character positions for glory kill, or making the prompt visible once the player’s health is below 15, or something else?

Well, im going to be honest everything. Im confused entirely I want to make it so the prox prompt only shows to everyone else but the person who’s low on health, then make the player who’s low on health unkillable when the animation plays.

if you’re struggling with everything, i suggest looking for a tutorial on youtube:
https://www.youtube.com/results?search_query=roblox+studio+glory+kill+tutorial

edit: step by step guide if you don’t feel like watching a tutorial:

  1. create an animation of a glory kill, and export each rig animation to roblox separately
  2. load animation for both players on proximity prompt trigger
  3. anchor both player’s humanoidrootpart to stop them from moving
  4. play animation for both players at the same time
  5. unanchor both hrp’s

Yeah I kinda tried that. When I look at some videos it’s kinda just drag and drop and hope it works. I would use the free models but then I wouldn’t know what to change without screwing everything up.

it’s better to spend some time looking at scripts and learning from them(ngl that is the exact thing that i’ve been doing to learn lua)
if something goes wrong, ctrl + z exists

Yeah makes sense i’ll try and see if I can understand what the free models do that I can learn from better thanks.

1 Like

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