I made a click combo punch thing where the stand click punches people. You can punch people even though your stand is not out. How do I fix this? Here’s what it looks like: https://gyazo.com/4d68ca28c15d8b2fe1150c4a5ea43af3
Here’s the client script:
Player = game.Players.LocalPlayer
repeat wait() until Player.Character
Character = Player.Character
mouse = Player:GetMouse()
Enabled = true
mouse.Button1Down:connect(function()
if Enabled == true then
if Character:FindFirstChild("Stand") then
for _, v in pairs(Player.Character:GetChildren()) do
if v:IsA("Tool") then return end
end
game.ReplicatedStorage.Combat:FireServer("Combat", "Left")
else
end
end
end)
Without seeing the rest of the script, I can’t tell whether or not ‘enabled’ changes. If it doesn’t, then the code will run regardless of whether the stand is out or not.