I was wondering how I would approach making a bounty poster system.
What do I want?
I want posters to appear on board anytime a player’s bounty has increased.
Issue?
I don’t know how to start the script.
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
--Player.CharacterAdded:Wait()
local folder = Instance.new("Folder", Character)
folder.Name = "Hit player's folder"
print("adding folder")
Character:WaitForChild("Humanoid").Died:Connect(function()
local findHitFolder = Character:WaitForChild("Hit player's folder")
local bounty = Player.leaderstats:WaitForChild("Bounty")
print("Player died")
if findHitFolder then
print("Found Folder")
local previousName
for _, v in pairs(findHitFolder:GetChildren()) do
print("Finding children")
if previousName == nil or previousName ~= v.Name then
print("Found + Adding bounty")
local otherplayer = game.Players:WaitForChild(v.Name)
local Enemybounty = otherplayer.leaderstats:WaitForChild("Bounty")
if Enemybounty < 100 then return end
bounty.Value = bounty.Value - (bounty.Value * 0.15)
Enemybounty.Value = Enemybounty.Value + (bounty.Value * 0.2)
end
end
end
end)
end)
end)
This is the bounty script I have so for. When a player dies they lose 1.5% of there bounty. When a player kills another player they get 2% of the other player’s bounty.
How would I use this script to make a wanted bounty poster?