``local Player=game.Players.LocalPlayer repeat wait() until Player.Character local Character=Player.Character mouse=Player:GetMouse()
Enable=true
mouse.Button1Down:connect(function() if Enable == true then script.Function:FireServer("Combat",Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-2).p) end end)
this is my code in game.StarterPack.LocalScript
``Enable=true Combo = 1
script.Parent.OnServerEvent:connect(function(Player,Action,V1) local c= Player.Character if Enable == false then return end if Action == "Combat" then Enable = false if Combo == 1 then Combo = 2 local Track = Instance.new("Animation") Track.AnimationId = "rbxassetid://4904629830" local Anim = c.Humanoid:LoadAnimation(Track) Anim:Play() elseif Combo == 2 then Combo = 1 local Track = Instance.new("Animation") Track.AnimationId = "rbxassetid://4904629830" local Anim = c.Humanoid:LoadAnimation(Track) Anim:Play() end wait(0.2) local Region = Region3.new(V1-Vector3.new(2,2,2),V1+Vector3.new(2,2,2)) local RTable = workspace:FindPartsInRegion3(Region,nil,28) for i,v in pairs(RTable) do if v.Parent:findFirstChild("Humanoid") and v.Parent:findFirstChild("Deb") == nil and v.Parent ~= c then local Deb =Instance.new("BoolValue",v.Parent) Deb.Name = "Deb" game.Debris:AddItem(Deb,0.2) v.Parent.Humanoid:TakeDamage(5) local S = Instance.new("Sound",v) S.SoundId = "rbxassetid://1089136667" S.PlaybackSpeed = math.random(80,120)/100 S:Play() end end wait(0.31) Enable = true end end)
this is my script for game.StarterPack.LocalScript.Function (i named RemoteEvent as Function)
btw im new at Lua and scripting helpers, pls help.

1 comment
Please format your code. https://scriptinghelpers.org/help/how-post-good-questions-answers scroll down to "Formatting"