Ad
Log in to vote
0

Monsters in droplets rpg kit drop items and award stats to the player who hit it first?

Asked by 7 days ago
Edited 7 days ago

So me and my friend decided to make an rpg game that is based off of another game, and we decided to use droplets rpg kit, this was going great until we finished the game to a certain point and were ready to publish, we had some friends test the game, and we found out that if you hit a boss or another really challenging mob, another, more stronger player, could kill the mob and the player with little to no items or stats would get insane drops from a boss that they would never be able to kill. Please someone help me with this as this is a very exploitable bug that could just ruin our game. I would like this to be changed to a final hit situation, where the player that deals that last bit of damage would get awarded. Thanks.

Here is the stat award script that I do not understand:

local _M = require(script.Parent.MobConfig) local Mob = script.Parent local Enemy = Mob.Enemy

function Award() if (Mob == nil) or (Enemy == nil) then return end if (not Enemy:FindFirstChild("Player_Tag")) then return end local Tag = Enemy:FindFirstChild("Player_Tag") if (not Tag) and (not Tag.Value) then return end local plr = Tag.Value if (not plr:FindFirstChild("leaderstats")) then return end local stats = plr:FindFirstChild("leaderstats") if (not stats:FindFirstChild("XP")) then return end if (not stats:FindFirstChild("Gold")) then return end wait(0.1) if script.FinalHitTrue.Value == true then if stats.Level.Value < _M.LevelRequiredToKill then return end stats.XP.Value = stats.XP.Value + _M.AwardedXP stats.Gold.Value = stats.Gold.Value + _M.AwardedGold end end

Enemy.Died:Connect(Award)

0
Pls format your script correctly MattVSNNL 614 — 6d

Answer this question