I m trying to make a combat system and obviously need a combo variable to keep track of what current combo i am in
game.ReplicatedStorage.Remotes.M1.OnServerEvent:Connect(function(player, Mouse)
print("Received M1 from the Client")
local combo = 0
local startTime = tick()
if combo == 3 then
print("M1 Combo!")
combo = 0
end
if tick() - startTime >= 2 then
combo = 0
end
combo = combo + 1
print(combo)
end)
但是,这似乎从来不会超过1年,也从来不会增加1艘船。
我曾尝试在文字上添加文字上的字句(见于 com博 = bo博+1),但没有任何真正得到帮助的人会得到任何帮助!