Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Recent Roblox Update Broke My Remote?

Asked by 5 years ago
Edited 5 years ago

I've worked on a one piece game for awhile and after recent roblox updates, my remote for damage broke a bit, more specifically the immune table is granted immunity to certain attacks no longer works. After trying to test to try and see what the issue was, I was stumped on what it could be since I received no error messages in my console nor knew of an update that broke this. Here is my code:

Eventos.Dano.OnServerInvoke = function(Player, chars, amt, hit, ahsfodfhg, dmgType) -- [[Amt refers to amount of damage, hit refers to if it hits or not "ahsfodfhg" is a check to ban exploiters, dmgtype refers to what method of attack it was, swords. aoe. melee. etc]]--
for i, v in pairs(chars) do
        if v:FindFirstChild("ForceField") then return false end
        local h = v:FindFirstChild("Humanoid");
        local p = h and game.Players:GetPlayerFromCharacter(h.Parent);

        local magics = 
        {
            ['Light'] = true;
            ['Fire'] = true;
        };

        if p and (magics[p.Data.Magic.Value] and not Player.Data.UsingMagicBane.Value and dmgType ~= "AOE") then -- if magic bane is on or aoe is the type then you can hit the magic user if not the next thing happens
            efectosServidor(p, "MagicDodge", p.Data.Magic.Value)
            wait(0.2)
            efectosServidor(p, "MagicDodge", p.Data.Magic.Value)
            return false; -- [[ if it wasnt "aoe" or attacking user didnt have magic bane on then a dodge would happen and no damage would result. ]] --
        end

I only received an issue w/ this very very recently (maybe around a week or so ago at max), without me editing anything involving it and other similar lines work just fine, its just this one.

Here is the few line magic immunity that does work just for reference if it helps: if p and (p.Data.Magic.Value == "Rubber" and dmgType == "Gun") then return false; end

Answer this question