local DataStore = game:GetService("DataStoreService")
local DmgP1 = DataStore:GetDataStore("DmgP001")
local Dmg1 = DataStore:GetDataStore("Dmg001")

game.Players.PlayerAdded:Connect(function(Plr)
	local stats = Instance.new("Folder", Plr)
	stats.Name = "Data"

	local DmgP = Instance.new("IntValue", stats)
	DmgP.Name = "DmgP"
	DmgP.Value = 0
	local Dmg = Instance.new("IntValue", stats)
	Dmg.Name = "Dmg"
	Dmg.Value = 0

	DmgP.Value = DmgP1:GetAsync(Plr.UserId) or DmgP.Value
	DmgP1:SetAsync(Plr.UserId, DmgP.Value)
	DmgP.Changed:connect(function()
		DmgP1:SetAsync(Plr.UserId, DmgP.Value)
	end)
	--- Dmg
	Dmg.Value = Dmg1:GetAsync(Plr.UserId) or Dmg.Value
	Dmg1:SetAsync(Plr.UserId, DmgP.Value)
	Dmg.Changed:connect(function()
		Dmg1:SetAsync(Plr.UserId, DmgP.Value)
	end)
end)

game.Players.PlayerRemoving:connect(function(Player)
	DmgP1:SetAsync(Player.UserId, Player.Data.DmgP.Value)
	Dmg1:SetAsync(Player.UserId, Player.Data.Dmg.Value)

end)

I've been trying for like 6 or 7 days to try to add A punch extension to this where I use Right hand and left hand While pressing just Q or just F, but I just can't seem to work it out. anyone able to help me with my problem?

2 comments

0

You could have it so it when q and e are clicked an animation plays

0

I'm trying to make it so you only have to hit Q to do left and right punch