Why is this happening

Here’s what happened
https://gyazo.com/016f9a795fc0daffc024357502878190

Hitbox34 Is the part that i have the problem with, It’s not in the right position i wanted it to. (I wanted i to only be in front of player but somethimes when i move it ended up in wried position)
This is server script
game.ReplicatedStorage:WaitForChild(“Kamehameha123”).OnServerEvent:Connect(function(Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
local TS = game:GetService(“TweenService”)
local SS = game:GetService(“ServerStorage”)
local HumRoot = Character:WaitForChild(“HumanoidRootPart”)
local Weld = Instance.new(“WeldConstraint”)
Weld.Name = “LL”
local Hitbox1 = SS.EffectFolders.Kamehameha:Clone()
Hitbox1.PointLight.Brightness = 0
Hitbox1.Name = “D123frf”
for i,v in pairs(Hitbox1.Attachment:GetChildren()) do
if v:IsA(“ParticleEmitter”) then
wait()
v.Enabled = false
end
end
Hitbox1.Size = Vector3.new(0,0,0)
Hitbox1.CFrame = Character.RightHand.CFrame + Character.RightHand.CFrame.UpVector * -0.4
Hitbox1.CanCollide = false
Hitbox1.CanTouch = true
Hitbox1.Anchored = false
Hitbox1.Archivable = true
Hitbox1.Locked = false
Hitbox1.CastShadow = false
Hitbox1.Transparency = 0

local Fstun = Character:FindFirstChild("Stun")
local Frag = Character.Effects:FindFirstChild("Ragdoll")
local Block = Character.Effects:FindFirstChild("IsBlocking")


if Fstun == nil and Frag == nil and Block == nil then
	Hitbox1.Parent = game.Workspace.FX
	TS:Create(Hitbox1,TweenInfo.new(0.25,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = Vector3.new(1.211, 1.211, 1.211)}):Play()
	TS:Create(Hitbox1.PointLight,TweenInfo.new(0.25,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Brightness = 5}):Play()
	Weld.Part0 = Character.RightHand
	Weld.Part1 = Hitbox1
	Weld.Parent = Character.RightHand
	for i,v in pairs(Hitbox1.Attachment:GetChildren()) do
		if v:IsA("ParticleEmitter") then
			wait(0.05)
			v.Enabled = true
		end
	end
 end

end)

game.ReplicatedStorage:WaitForChild(“Kamehameha12345”).OnServerEvent:Connect(function(Player)
spawn(function()
for i,v in pairs(game.Workspace.FX:GetChildren()) do
if v.Name == “D123frf” then
game.Debris:AddItem(v,0)
end
end

	local D = Player.Character.RightHand:FindFirstChild("LL")
	game.Debris:AddItem(D,0)
end)

end)

game.ReplicatedStorage:WaitForChild(“Kamehameha1234”).OnServerEvent:Connect(function(Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild(“Humanoid”)
local HumRoot = Character:WaitForChild(“HumanoidRootPart”)
local Weld = Instance.new(“WeldConstraint”)
local Weld1 = Instance.new(“WeldConstraint”)
local Weld2 = Instance.new(“WeldConstraint”)
local Debounce = false
local I2 = Instance.new(“Animation”)
I2.AnimationId = “rbxassetid://9331938538”
local Hitbox = game.ServerStorage.EffectFolders.Kame:Clone()
Hitbox.Size = Vector3.new(0.001, 0.001, 18.106)
Hitbox.CFrame = HumRoot.CFrame + HumRoot.CFrame.LookVector * 12
Hitbox.CanCollide = false
Hitbox.CanTouch = true
Hitbox.Anchored = false
Hitbox.Archivable = true
Hitbox.Locked = false
Hitbox.CastShadow = false
Hitbox.Transparency = 0
local P

--------------------------------------------------------------------------------
local Weld3 = Instance.new("WeldConstraint")


local Hitbox1 = Instance.new("Part")
Hitbox1.Material = Enum.Material.Neon
Hitbox1.Color = Color3.new(1, 0.0431373, 0.0431373)
Hitbox1.Size = Vector3.new(1.484, 1.089, 18.106)
Hitbox1.CFrame = HumRoot.CFrame + HumRoot.CFrame.LookVector * 12
Hitbox1.CanCollide = false
Hitbox1.CanTouch = true
Hitbox1.Anchored = false
Hitbox1.Archivable = true
Hitbox1.Locked = false
Hitbox1.CastShadow = false
Hitbox1.Transparency = 1

local Hitbox2 = game.ServerStorage.EffectFolders.Kamehameha:Clone()
Hitbox2.CFrame = HumRoot.CFrame + HumRoot.CFrame.LookVector * 2.7  
Hitbox2.CanCollide = false
Hitbox2.CanTouch = true
Hitbox2.Anchored = false
Hitbox2.Archivable = true
Hitbox2.Locked = false
Hitbox2.CastShadow = false
Hitbox2.Transparency = 0

local Hitbox34 = game.ServerStorage.EffectFolders.WindEffect:Clone()
Hitbox34.CFrame = Hitbox2.CFrame
Hitbox34.CanCollide = false
Hitbox34.CanTouch = false
Hitbox34.Anchored = false
Hitbox34.Archivable = true
Hitbox34.Locked = false
Hitbox34.CastShadow = false
Hitbox34.Transparency = 1

local Fstun = Character:FindFirstChild("Stun")
local Frag = Character.Effects:FindFirstChild("Ragdoll")
local Block = Character.Effects:FindFirstChild("IsBlocking")
local Weld3 = Instance.new("WeldConstraint")

if Fstun == nil and Frag == nil and Block == nil then
	local TS = game:GetService("TweenService")
	HumRoot.Anchored = true
	Hitbox.Parent = game.Workspace.FX
	Weld.Part0 = Hitbox
	Weld.Part1 = HumRoot
	Weld.Parent = HumRoot
	Hitbox1.Parent = game.Workspace.FX
	Weld1.Part0 = Hitbox1
	Weld1.Part1 = HumRoot
	Weld1.Parent = HumRoot
	Hitbox2.Parent = game.Workspace.FX
	Weld2.Part0 = Hitbox2
	Weld2.Part1 = HumRoot
	Weld2.Parent = HumRoot
	

	--------------------------------------------------------------------------------
	
	local hitE = {}


	Hitbox1.Touched:Connect(function(hit)
		if hit.Parent:IsA("Model") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Humanoid").Health > 0 and hit.Parent ~= Character and Character:FindFirstChild("Stun") == nil and Character:FindFirstChild("IsBlocking") == nil and hit.Parent:FindFirstChild("IsBlocking") == nil and Character.Effects:FindFirstChild("Ragdoll") == nil then -- no way you can miss because the debounce is for per enemy
			if hit.Parent:IsA("Model") and hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Humanoid").Health > 0 and hit.Parent ~= Character and Character:FindFirstChild("Stun") == nil and Character:FindFirstChild("IsBlocking") == nil and hit.Parent:FindFirstChild("IsBlocking") == nil and Character.Effects:FindFirstChild("Ragdoll") == nil then
				local eneH = hit.Parent.Humanoid

				local found
				for _, character in next, hitE do
					if character == eneH then
						-- some boolean toggle for match
						found = true
					end
				end

				if not found then

					local Rag2 = Instance.new("BoolValue")
					Rag2.Name = "Ragdoll"
					local Stu2 = Instance.new("BoolValue")
					Stu2.Name = "Stun"
					local Bovy = Instance.new("BodyVelocity")
					Bovy.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
					Bovy.Velocity = Character.HumanoidRootPart.CFrame.LookVector * 50 + Character.HumanoidRootPart.CFrame.UpVector * 17
					local Eff1 = hit.Parent:FindFirstChild("Effects")
					local StunHandler = require(script.Parent.StunHandlerV2)
					local IsBlocking = hit.Parent:FindFirstChild("IsBlocking")
					local H1 = hit.Parent:FindFirstChild("Hitbox")
					local GB = Instance.new("BoolValue")
					GB.Name = "GuardBroken"

					table.insert(hitE, eneH) 

					
					Player.Combo.Value = Player.Combo.Value + 1
					eneH:TakeDamage(65)
					Bovy.Parent = hit.Parent:FindFirstChild("HumanoidRootPart")
					Rag2.Parent = Eff1
					Stu2.Parent = hit.Parent
					game.Debris:AddItem(Bovy,0.1)
					game.Debris:AddItem(Rag2,1.25)
					game.Debris:AddItem(Stu2,1.25)

					--Hitbox1.CanTouch = false

					wait(20)
					for i, character in next, hitE do
						if character == eneH then
							table.remove(hitE, i)
						end
					end
				end
			end
		end
	end)
	
	-----------------------------------------------------------------------
	
	local JJJ = script:WaitForChild("AnimationEE2")
	local HH = Humanoid:LoadAnimation(JJJ);
	local D = TS:Create(Hitbox,TweenInfo.new(0.25,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size = Vector3.new(1.484, 1.089, 18.106)})
	D:Play()
	HH:Play();
	
	
	
	
	

	task.delay(0.01,function()
		Hitbox34.Anchored = true
	end)
	
	task.delay(0.65,function()
		Hitbox34.Trail.Enabled = false
		
	end)
	task.delay(0.125,function()
		Hitbox34.Trail.Enabled = true
	end)
	
	--Hitbox34.Anchored = true
	
	local spininfo = TweenInfo.new(0.35,Enum.EasingStyle.Linear)
	local Spin1 = TS:Create(Hitbox34,spininfo,{CFrame = Hitbox34.CFrame * CFrame.Angles(0,0,math.rad(120))})
	local Spin2 = TS:Create(Hitbox34,spininfo,{CFrame = Hitbox34.CFrame * CFrame.Angles(0,0,math.rad(240))})
	local Spin3 = TS:Create(Hitbox34,spininfo,{CFrame = Hitbox34.CFrame * CFrame.Angles(0,0,math.rad(360))})

	Spin1.Completed:Connect(function()Spin2:Play() end)
	Spin2.Completed:Connect(function()Spin3:Play() end)
	--Spin3.Completed:Connect(function()Spin1:Play() end)

	Spin1:Play()
	
	

	
	
	
	
	D.Completed:Connect(function()
		for i,v in pairs(Hitbox2.Attachment:GetChildren()) do
			if v:IsA("ParticleEmitter") and v.Name ~= "HitEffect" then
				wait(0.1)
				v.Enabled = false
			end
			if v.Name == "HitEffect" then
				--wait(0.01)
				v.Enabled = false
			end
		end
		
		local D1 = TS:Create(Hitbox,TweenInfo.new(0.15,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Size = Vector3.new(0,0,18.106)})
		TS:Create(Hitbox2.PointLight,TweenInfo.new(0.15,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Brightness = 0}):Play()
		Hitbox.Specs.Enabled = false
		TS:Create(Hitbox.PointLight,TweenInfo.new(0.15,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Brightness = 0}):Play()
		TS:Create(Hitbox2,TweenInfo.new(0.25,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Size = Vector3.new(0,0,0)}):Play()
		D1:Play()
		
		spawn(function()
			
			
			
			
			D1.Completed:Connect(function()
				HH:Stop();
				--Hitbox34.Trail.Enabled = true
				
				--game.Debris:AddItem(Weld3,0)
				TS:Create(Hitbox,TweenInfo.new(0.1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out), 
					{Transparency = 1}):Play()
				game.Debris:AddItem(Hitbox,0.7)
				game.Debris:AddItem(Hitbox1,0.14)
				game.Debris:AddItem(Hitbox2,0.75)
				game.Debris:AddItem(Hitbox34,1.7)
				game.Debris:AddItem(Weld,0.1)
				game.Debris:AddItem(Weld1,0.1)
				game.Debris:AddItem(Weld2,0.1)
				game.Debris:AddItem(Weld3,0.1)
				Hitbox.Anchored = true
				Hitbox2.Anchored = true
				Hitbox34.Anchored = true
				for i,v in pairs(Hitbox2.Attachment33:GetChildren()) do
					if v:IsA("ParticleEmitter") and v.Name == "Sparkle" then
						wait(0.05)
						v:Emit(1)
					end
					if v:IsA("ParticleEmitter") and v.Name == "OrangeSpark" then
						wait(0.05)
						v:Emit(5)
					end
				end	
			end)
		end)
	end)
	Humanoid.AutoRotate = false
	wait(1.1)
	HumRoot.Anchored = false
	Humanoid.AutoRotate = true
end

end)

game.ReplicatedStorage.Ev1.OnServerEvent:Connect(function(Player)
game.ReplicatedStorage.CorrectionEffect:FireClient(Player)
end)

game.ReplicatedStorage.Shake.OnServerEvent:Connect(function(Player)
game.ReplicatedStorage.Remotes.Camera.RoughDriving:FireClient(Player)
end)

The Hitbox34 is a trail part btw

This is local script
local Player = game:GetService(“Players”).LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Hum = Character:WaitForChild(“Humanoid”)
local Root = Character:WaitForChild(“HumanoidRootPart”)
local DD = Root.Orientation
local UIS = game:GetService(“UserInputService”)
local Mouse = Player:GetMouse()
local RunService = game:GetService(“RunService”)
local E = false
local P
local DDD = script:WaitForChild(“AnimationEE”)
local Anim = Hum:LoadAnimation(DDD);
local DDD1 = script:WaitForChild(“AnimationEE2”)
local Anim1 = Hum:LoadAnimation(DDD1);
local DDDDDD = false
local Debounce = 1
local Relase = 1
local start = tick()
local Duration = 7
local D = true
local FirstDebounce = true

if Character:FindFirstChild(“IsBlocking”) == nil and Character:FindFirstChild(“Stun”) == nil and Character.Effects:FindFirstChild(“Ragdoll”) == nil and DDDDDD == false then

if D == false then
	return nil
end

if D == true then

	

	UIS.InputBegan:Connect(function(Input,IsTyping)
		if not IsTyping then
			if Input.KeyCode == Enum.KeyCode.F and DDDDDD == false and Debounce == 1 and FirstDebounce == true then
				FirstDebounce = false
				Debounce = 2
				D = false
				Anim:Play();
				game.ReplicatedStorage.Kamehameha123:FireServer(Player)
				
				
				
				





					local Time = tick()		
					repeat
						if (tick() - Time) >= Duration then 
							Debounce = 5
							DDDDDD = true
							game.ReplicatedStorage.Kamehameha1234:FireServer(Player)
							game.ReplicatedStorage.Kamehameha12345:FireServer(Player)
							--game.ReplicatedStorage.Ev1:FireServer(Player)
							game.ReplicatedStorage.Shake:FireServer(Player)
							Anim:Stop();
							--Root.Anchored = false
							Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
							wait(4)
							DDDDDD = false
						Debounce = 1
						FirstDebounce = true
						
						if FirstDebounce == false then
							FirstDebounce = true
						end
						
						
						
						
							break
						end
						task.wait()
					until
					Debounce == 5 or Debounce == 3
			end
		end
	end)


	UIS.InputEnded:Connect(function(Input,IsTyping)
		if not IsTyping then
			if Input.KeyCode == Enum.KeyCode.F and DDDDDD == false and Debounce == 2 then
				delay(0.4,function()
					Debounce = 3
					DDDDDD = true
					--wait(0.4)
					game.ReplicatedStorage.Kamehameha1234:FireServer(Player)
					game.ReplicatedStorage.Kamehameha12345:FireServer(Player)
					--game.ReplicatedStorage.Ev1:FireServer(Player)
					game.ReplicatedStorage.Shake:FireServer(Player)
					Anim:Stop();
					--Root.Anchored = false
					D = false
					
				end)
				D = true
				wait(4)
				D = true
				DDDDDD = false
				Debounce = 1
				FirstDebounce = true
				if FirstDebounce == false then
					FirstDebounce = true
				end
			end
		end
	end)
end 

end

if Character:FindFirstChild(“Stun”) or Character.Effects:FindFirstChild(“Ragdoll”) then
Anim:Stop();
Root.Anchored = false
Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
end

1 Like

Codes are not fully in syntax.
Issue is about white line, right?

1 Like