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)