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

Damage doesn't work, only shows for one player?

Asked by 5 years ago

So, I couldn't figure out how to do damage with a script, then I got some help. Now, another problem has happen.

BTW This is a local script.

     elseif combo == 2 then
                wait(combo_delay3)
                combo = 3
                print(combo)
                ComboGui.Text = "L - R - R"
                local SS = script.SlashSound:Clone()
                SS.Parent = Character.Head
                SS:Play()
                local animTrack = Player.Character.Humanoid:LoadAnimation(script.Animation3)
                animTrack:Play()
                Character.RightFoot.Touched:connect(function(hit)
                if hit.Parent.Humanoid and dmg == true then
                hit.Parent.Humanoid:TakeDamage(8)
                dmg = false
                wait(1)
                dmg = true
                wait(2.5)
                ComboGui.Text = ""
        end
        end)
       end
       end
    end
end)
--Not showing full script so people don't copy

The damage only shows up for the player doing the attack, anyway to fix this? Thanks.

1 answer

Log in to vote
2
Answered by 5 years ago

The client doesn't replicate many things onto the server, with the new FE Update; regardless whether you checked that FilteringEnabled box or not your game will automatically be converted to FE. In short, you can't put this in a local script otherwise the damage will only be displayed to one player instead of the rest. Here is a link for help on how to understand how FilteringEnabled works:

https://www.robloxdev.com/api-reference/property/Workspace/FilteringEnabled https://www.robloxdev.com/articles/Remote-Functions-and-Events

Ad

Answer this question