Im making PVP toggle GUI, but dont know how to actually disable the damage from sword for the players that disables PVP.
The damage from tool (for now im using "classic sword" but gonna change the tool later) must be taken only if player has PVP : ON
here's the script of GUI, im using FE, so on others screen peoples wont be died.
local colorf = script.Parent:WaitForChild("Color") local button = script.Parent local Toggle = false local Event = game.ReplicatedStorage.Events:WaitForChild("PVPON") local Event2 = game.ReplicatedStorage.Events:WaitForChild("PVPOFF") function onClick() if Toggle == false then Toggle=true colorf.ImageColor3 = Color3.fromRGB(76,177,96) button.Text = "ON" Event:FireServer() else Toggle=false colorf.ImageColor3 = Color3.fromRGB(177,108,109) button.Text = "OFF" Event2:FireServer() end end button.MouseButton1Down:connect(onClick)
there is nothing about disabling or enabling pvp, only GUI cause i dont actually know what to do.