Players.rusted010101.Backpack.GojoScript:35: attempt to index nil with 'CFrame' - Client - GojoScript:35

Hello! I have found out my script… Hasnt been working quite good

I was wondering whats wrong with this part
workspace.CurrentCamera.CFrame = extra1.CFrame

Heres the full code:

```local uis = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
-- LoadCharacter --
repeat wait()
until game.Workspace:FindFirstChild(plr.Name)
-- Done --
local char = game.Workspace:FindFirstChild(plr.Name)
print(char)

local TweenService = game:GetService("TweenService")

uis.InputBegan:Connect(function(input,chat)
	if chat then
		return
	elseif input.KeyCode == Enum.KeyCode.One and not char:FindFirstChild("onSkill") then -- Replace "One" with the key you want to press
		script.Remote:FireServer("Reversal Red")
	elseif input.KeyCode == Enum.KeyCode.Two and not char:FindFirstChild("onSkill") and not char:FindFirstChild("AP") then -- Replace "Two" with the key you want to press
		script.Remote:FireServer("Lapse Blue",mouse.hit.p)
	elseif input.KeyCode == Enum.KeyCode.Three and not char:FindFirstChild("onSkill") and not char:FindFirstChild("AP") then -- Replace "Three" with the key you want to press
		script.Remote:FireServer("Domain Expansion")
	elseif input.KeyCode == Enum.KeyCode.Four and not char:FindFirstChild("onSkill") and not char:FindFirstChild("AP") then -- Replace "Four" with the key you want to press
		script.Remote:FireServer("Hollow Purple")
	end
end)

script.Remote.OnClientEvent:Connect(function(event,extra1,extra2,extra3)
	local OriginalTransparency = nil
	if event == "CameraEvent1" then
		repeat wait()
			workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
		until workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable
		repeat
			wait()
			workspace.CurrentCamera.CFrame = extra1.CFrame
			if workspace.CurrentCamera.CameraType == Enum.CameraType.Custom then
				break
			end
		until extra2 == false
		workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	elseif event == "Done" then
		for i, a in pairs(workspace:GetChildren()) do
			if a:IsA("Part") or a:IsA("MeshPart") and a ~= extra1 then
				a.Transparency = 0
				for i, e in pairs(a:GetChildren()) do
					if e:IsA("Texture") or e:IsA("Decal") then
						e.Transparency = 0
						if workspace:FindFirstChild("Baseplate") then
							workspace:FindFirstChild("Baseplate").Texture.Transparency = 0.8
						end
					end
				end
			end
		end
		for i, b in pairs(workspace:GetChildren()) do
			if b:IsA("Model") and not b:FindFirstChild("Humanoid") and not b:FindFirstChild("HumanoidRootPart") then
				for i, c in pairs(b:GetChildren()) do
					if c:IsA("Part") or c:IsA("MeshPart") then
						c.Transparency = 0
						for i, d in pairs(c:GetChildren()) do
							if d:IsA("Texture") or d:IsA("Decal") then
								d.Transparency = 0
							end
						end
					end
				end
			end
		end
	elseif event == "TransparencyEvent" then
		for i, a in pairs(workspace:GetChildren()) do
			if a:IsA("Part") or a:IsA("MeshPart") and a ~= extra1 then
				a.Transparency = 1
				for i, e in pairs(a:GetChildren()) do
					if e:IsA("Texture") or e:IsA("Decal") then
						e.Transparency = 1
					end
				end
			end
		end
		for i, b in pairs(workspace:GetChildren()) do
			if b:IsA("Model") and not b:FindFirstChild("Humanoid") and not b:FindFirstChild("HumanoidRootPart") then
				for i, c in pairs(b:GetChildren()) do
					if c:IsA("Part") or c:IsA("MeshPart") then
						c.Transparency = 1
						for i, d in pairs(c:GetChildren()) do
							if d:IsA("Texture") or d:IsA("Decal") then
								d.Transparency = 1
							end
						end
					end
				end
			end
		end
		local brightgoal = {}
		brightgoal.Brightness = 1
		local brightinfo = TweenInfo.new(0.25,Enum.EasingStyle.Linear)
		local brighttween = TweenService:Create(game.Lighting.BrightControl,brightinfo,brightgoal)
		brighttween:Play()
		brighttween.Completed:Connect(function()
			wait(0.1)

			local brightgoal2 = {}
			brightgoal2.Brightness = 0
			local brightinfo2 = TweenInfo.new(0.25,Enum.EasingStyle.Linear)
			local brighttween2 = TweenService:Create(game.Lighting.BrightControl,brightinfo2,brightgoal2)
			brighttween2:Play()
		end)
	elseif event == "Fog" then
		
	end
end)```
1 Like

Your attempting to index nothing with CFrame, recheck your code to see if there is a CFrame issue and also give me the exact line where the error is occurring as I’m on limited time and it will allow me to fix your issue easier.

#help-and-feedback:scripting-support
Move this thread here, this isn’t the right place

2 Likes

i changed the code a bit but didint help
imma bold out the error line for you

local uis = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
-- LoadCharacter --
repeat wait()
until game.Workspace:FindFirstChild(plr.Name)
-- Done --
local char = game.Workspace:FindFirstChild(plr.Name)
print(char)

local TweenService = game:GetService("TweenService")

uis.InputBegan:Connect(function(input,chat)
	if chat then
		return
	elseif input.KeyCode == Enum.KeyCode.One and not char:FindFirstChild("onSkill") then -- Replace "One" with the key you want to press
		script.Remote:FireServer("Reversal Red")
	elseif input.KeyCode == Enum.KeyCode.Two and not char:FindFirstChild("onSkill") and not char:FindFirstChild("AP") then -- Replace "Two" with the key you want to press
		script.Remote:FireServer("Lapse Blue",mouse.hit.p)
	elseif input.KeyCode == Enum.KeyCode.Three and not char:FindFirstChild("onSkill") and not char:FindFirstChild("AP") then -- Replace "Three" with the key you want to press
		script.Remote:FireServer("Domain Expansion")
	elseif input.KeyCode == Enum.KeyCode.Four and not char:FindFirstChild("onSkill") and not char:FindFirstChild("AP") then -- Replace "Four" with the key you want to press
		script.Remote:FireServer("Hollow Purple")
	end
end)

script.Remote.OnClientEvent:Connect(function(event,extra1,extra2,extra3)
	local OriginalTransparency = nil
	if event == "CameraEvent1" then
		repeat wait()
			workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
		until workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable
		repeat
			wait()
			**if workspace.CurrentCamera.CFrame ~= extra1.Position then**
				
				wait()
				
				if extra1 then
					
					wait()
					
					workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
					
					**workspace.CurrentCamera.Position = extra1.Position**
					
				else repeat until extra1					
					
				end
			
			end
			if workspace.CurrentCamera.CameraType == Enum.CameraType.Custom then
				break
			end
		until extra2 == false
		workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	elseif event == "Done" then
		for i, a in pairs(workspace:GetChildren()) do
			if a:IsA("Part") or a:IsA("MeshPart") and a ~= extra1 then
				a.Transparency = 0
				for i, e in pairs(a:GetChildren()) do
					if e:IsA("Texture") or e:IsA("Decal") then
						e.Transparency = 0
						if workspace:FindFirstChild("Baseplate") then
							workspace:FindFirstChild("Baseplate").Texture.Transparency = 0.8
						end
					end
				end
			end
		end
		for i, b in pairs(workspace:GetChildren()) do
			if b:IsA("Model") and not b:FindFirstChild("Humanoid") and not b:FindFirstChild("HumanoidRootPart") then
				for i, c in pairs(b:GetChildren()) do
					if c:IsA("Part") or c:IsA("MeshPart") then
						c.Transparency = 0
						for i, d in pairs(c:GetChildren()) do
							if d:IsA("Texture") or d:IsA("Decal") then
								d.Transparency = 0
							end
						end
					end
				end
			end
		end
	elseif event == "TransparencyEvent" then
		for i, a in pairs(workspace:GetChildren()) do
			if a:IsA("Part") or a:IsA("MeshPart") and a ~= extra1 then
				a.Transparency = 1
				for i, e in pairs(a:GetChildren()) do
					if e:IsA("Texture") or e:IsA("Decal") then
						e.Transparency = 1
					end
				end
			end
		end
		for i, b in pairs(workspace:GetChildren()) do
			if b:IsA("Model") and not b:FindFirstChild("Humanoid") and not b:FindFirstChild("HumanoidRootPart") then
				for i, c in pairs(b:GetChildren()) do
					if c:IsA("Part") or c:IsA("MeshPart") then
						c.Transparency = 1
						for i, d in pairs(c:GetChildren()) do
							if d:IsA("Texture") or d:IsA("Decal") then
								d.Transparency = 1
							end
						end
					end
				end
			end
		end
		local brightgoal = {}
		brightgoal.Brightness = 1
		local brightinfo = TweenInfo.new(0.25,Enum.EasingStyle.Linear)
		local brighttween = TweenService:Create(game.Lighting.BrightControl,brightinfo,brightgoal)
		brighttween:Play()
		brighttween.Completed:Connect(function()
			wait(0.1)

			local brightgoal2 = {}
			brightgoal2.Brightness = 0
			local brightinfo2 = TweenInfo.new(0.25,Enum.EasingStyle.Linear)
			local brighttween2 = TweenService:Create(game.Lighting.BrightControl,brightinfo2,brightgoal2)
			brighttween2:Play()
		end)
	elseif event == "Fog" then
		
	end
end)

its line 45 and 35 btw :smiley:

oh and the error is here

  15:03:50.667  Players.rusted010101.Backpack.GojoScript:35: attempt to index nil with 'Position'  -  Client - GojoScript:35
  15:03:50.668  Stack Begin  -  Studio
  15:03:50.668  Script 'Players.rusted010101.Backpack.GojoScript', Line 35  -  Studio - GojoScript:35
  15:03:50.668  Stack End  -  Studio

Show the server code where you pass extra1 to the RemoteEvent.

local debris = game:GetService("Debris")
local TweenService = game:GetService("TweenService")

function ReversalRed(char,hum,hrp,plr)
	local loadanims = hum:LoadAnimation(script.Red)
	loadanims:Play()
	wait(0.5)
	loadanims:AdjustSpeed(0)
	wait(0.05)
	local quote = script.Quote:Clone()
	quote.Parent = char.Head
	local rarm = char["Right Arm"]
	local Red = game.ReplicatedStorage.Gojo_Skills.Red:Clone()
	Red.Joint.Part0 = rarm
	Red.Parent = char
	
	local charge = game.ReplicatedStorage.Gojo_Skills.Change:Clone()
	charge.Parent = hrp
	charge:Play()
	
	for i = 1, #"Cursed Tenhnique" do
		quote:FindFirstChild("Text").Text = string.sub("Cursed Tenhnique", 1, i)
		wait(0.05)
	end
	coroutine.resume(coroutine.create(function()
		wait(0.1)
		for i = 1,10 do
			wait()
			quote:FindFirstChild("Text").TextTransparency = quote:FindFirstChild("Text").TextTransparency + 0.1
			quote:FindFirstChild("Text").TextStrokeTransparency = quote:FindFirstChild("Text").TextStrokeTransparency + 0.1
		end
		quote:FindFirstChild("Text").Text = ""
		quote:FindFirstChild("Text").TextTransparency = 0
		quote:FindFirstChild("Text").TextStrokeTransparency = 0
	end))
	for i,beam in pairs(Red:GetChildren()) do
		if beam:IsA("Beam")  then
			beam.Enabled = false
		end
	end
	for i,particle in pairs(Red.ParticleAttachment:GetChildren()) do
		if particle:IsA("ParticleEmitter")  then
			particle.Enabled = false
		end
	end
	wait(0.5)
	for i = 1, #"Reversal: Red" do
		quote:FindFirstChild("Text").Text = string.sub("Reversal: Red", 1, i)
		wait(0.05)
	end
	wait(0.2)
	coroutine.resume(coroutine.create(function()
		wait(0.1)
		for i = 1,10 do
			wait()
			quote:FindFirstChild("Text").TextTransparency = quote:FindFirstChild("Text").TextTransparency + 0.1
			quote:FindFirstChild("Text").TextStrokeTransparency = quote:FindFirstChild("Text").TextStrokeTransparency + 0.1
		end
		quote:FindFirstChild("Text").Text = ""
		quote:FindFirstChild("Text").TextTransparency = 0
		quote:FindFirstChild("Text").TextStrokeTransparency = 0
	end))
	local lightgo = {}
	lightgo.Range = 40
	local lightin = TweenInfo.new(1.2,Enum.EasingStyle.Linear)
	local lighttween = TweenService:Create(Red.RedLight,lightin,lightgo)
	lighttween:Play()
	
	local lightgo2 = {}
	lightgo2.Brightness = 1
	local lightin2 = TweenInfo.new(1.2,Enum.EasingStyle.Quint)
	local lighttween2 = TweenService:Create(game.Lighting.LightScreen,lightin2,lightgo2)
	lighttween2:Play()
	
	lighttween.Completed:Connect(function()
		wait(0.1)
		
		loadanims:Stop()
		
		debris:AddItem(Red,0)
		debris:AddItem(charge,0.5)
		
		game.Lighting.LightScreen.Brightness = 0
		
		local smoke = game.ReplicatedStorage.Gojo_Skills.Smoke:Clone()
		smoke.CFrame = hrp.CFrame*CFrame.new(0,-2.8,0) * CFrame.Angles(math.rad(90),0,0)
		smoke.Parent = workspace
		
		local sound = game.ReplicatedStorage.Gojo_Skills.Explosion:Clone()
		sound.Parent = hrp
		sound:Play()
		debris:AddItem(sound,sound.TimeLength + 0.2)
		
		local hitbox = game.ReplicatedStorage.Gojo_Skills.RedHitbox:Clone()
		hitbox.Parent = workspace
		hitbox.CFrame = hrp.CFrame * CFrame.new(0,0,-35)
		debris:AddItem(hitbox,0.2)
		
		hitbox.Touched:Connect(function(hit)
			local EHumanoid = hit.Parent:FindFirstChild("Humanoid")
			local EHumanoidRP = hit.Parent:FindFirstChild("HumanoidRootPart")
			if EHumanoid and EHumanoid.Health > 0 and EHumanoid.Parent.Name ~= plr.Name and not hit.Parent:FindFirstChild(plr.Name.." AlreadyDamage(HP)") then
				local echar = hit.Parent
				local AlreadyDamage = Instance.new("BoolValue")
				AlreadyDamage.Parent = echar
				AlreadyDamage.Name = plr.Name.." AlreadyDamage(HP)"
				debris:AddItem(AlreadyDamage, 0.3)

				EHumanoid:TakeDamage(30)
			end
		end)
		
		coroutine.resume(coroutine.create(function()
			wait(0.5)
			smoke.Attachment1.ParticleEmitter.Enabled = false
			smoke.Attachment2.ParticleEmitter.Enabled = false
			wait(1)
			debris:AddItem(smoke,0)
		end))
		
		coroutine.resume(coroutine.create(function()
			for i = 1,15 do
				wait()			
				local Rock1 = game.ReplicatedStorage.Gojo_Skills.Rock:Clone()
				Rock1.Size = Rock1.Size + Vector3.new(i / 2,i / 2,i / 2)
				Rock1.CFrame = hrp.CFrame*CFrame.new(4.5 + i + 0.3,-2.5,-3 - i * 4.5) * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
				Rock1.Parent = workspace
				debris:AddItem(Rock1,3)
				
				local Rock2 = game.ReplicatedStorage.Gojo_Skills.Rock:Clone()
				Rock2.Size = Rock2.Size + Vector3.new(i / 2,i / 2,i / 2)
				Rock2.CFrame = hrp.CFrame*CFrame.new(-4.5 - i + 0.3,-2.5,-3 - i * 4.5) * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
				Rock2.Parent = workspace
				debris:AddItem(Rock2,3)
				
				local para = RaycastParams.new()
				para.FilterDescendantsInstances = {Rock1,Rock2}
				para.FilterType = Enum.RaycastFilterType.Blacklist
				
				local ray1 = workspace:Raycast(Rock1.CFrame.p + Vector3.new(0, 1, 0),Vector3.new(0, -15, 0),para)
				if ray1 then
					Rock1.Material = ray1.Instance.Material
					Rock1.Color = ray1.Instance.Color
				end
				
				local ray2 = workspace:Raycast(Rock2.CFrame.p + Vector3.new(0, 1, 0),Vector3.new(0, -15, 0),para)
				if ray2 then
					Rock2.Material = ray2.Instance.Material
					Rock2.Color = ray2.Instance.Color
				end
			end
		end))
		
		wait(0.3)
	end)
end

function LapseBlue(char,hum,hrp,extra1,plr)
	
	if workspace:FindFirstChild(plr.Name.." Lapse Blue") then
		local Blue = workspace:FindFirstChild(plr.Name.." Lapse Blue")
		Blue.Force.Velocity = Vector3.new(0,0,0)
		Blue["Attachment(Particle)"].Bit:Emit(80)
		Blue["Attachment(Particle)"].Circle:Emit(1)
		local AlreadyPress = Instance.new("BoolValue")
		AlreadyPress.Name = "AP"
		AlreadyPress.Parent = char
		debris:AddItem(Blue,1)
		debris:AddItem(AlreadyPress,1)
		local Hitbox = game.ReplicatedStorage.Gojo_Skills.BlueHitbox:Clone()
		Hitbox.CFrame = Blue.CFrame
		Hitbox.Parent = workspace
		local smallgobrrr = {}
		smallgobrrr.Size = Vector3.new(0,0,0)
		local smallgobrrrin = TweenInfo.new(0.6,Enum.EasingStyle.Quint)
		local smallgobrrrtween = TweenService:Create(Hitbox,smallgobrrrin,smallgobrrr)
		smallgobrrrtween:Play()
		debris:AddItem(Hitbox,0.5)
		Hitbox.Touched:Connect(function(hit)
			local EHumanoid = hit.Parent:FindFirstChild("Humanoid")
			local EHumanoidRP = hit.Parent:FindFirstChild("HumanoidRootPart")
			if EHumanoid and EHumanoid.Health > 0 and EHumanoid.Parent.Name ~= plr.Name and not hit.Parent:FindFirstChild(plr.Name.." AlreadyDamage") then
				local echar = hit.Parent
				local AlreadyDamage = Instance.new("BoolValue")
				AlreadyDamage.Parent = echar
				AlreadyDamage.Name = plr.Name.." AlreadyDamage"
				debris:AddItem(AlreadyDamage, 1)
				
				EHumanoid:TakeDamage(30)
				
				local bf = Instance.new("BodyPosition",EHumanoidRP)
				bf.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
				bf.Position = Blue.Position
				bf.Name = "BForce"
				debris:AddItem(bf,1.5)
			end
		end)
	else
		local loadanims = hum:LoadAnimation(script.Red)
		loadanims:Play()
		wait(0.5)
		loadanims:AdjustSpeed(0)
		wait(0.05)
		
		local charge = game.ReplicatedStorage.Gojo_Skills.Change:Clone()
		charge.Parent = hrp
		charge:Play()
		
		local quote = script.Quote:Clone()
		quote.Parent = char.Head
		local rarm = char["Right Arm"]
		local Blue2 = game.ReplicatedStorage.Gojo_Skills.Blue2:Clone()
		Blue2.Joint.Part0 = rarm
		Blue2.Parent = char
		
		for i = 1, #"Cursed Tenhnique" do
			quote:FindFirstChild("Text").Text = string.sub("Cursed Tenhnique", 1, i)
			wait(0.05)
		end
		coroutine.resume(coroutine.create(function()
			wait(0.1)
			for i = 1,10 do
				wait()
				quote:FindFirstChild("Text").TextTransparency = quote:FindFirstChild("Text").TextTransparency + 0.1
				quote:FindFirstChild("Text").TextStrokeTransparency = quote:FindFirstChild("Text").TextStrokeTransparency + 0.1
			end
			quote:FindFirstChild("Text").Text = ""
			quote:FindFirstChild("Text").TextTransparency = 0
			quote:FindFirstChild("Text").TextStrokeTransparency = 0
		end))
		wait(0.5)
		charge:Stop()
		loadanims:Stop()
		local Throw = game.ReplicatedStorage.Gojo_Skills.Throw:Clone()
		Throw.Parent = hrp
		Throw:Play()
		debris:AddItem(Throw,4)
		local loadanims = hum:LoadAnimation(script.Throw)
		loadanims:Play()
		debris:AddItem(Blue2,0)
		coroutine.resume(coroutine.create(function()
			for i = 1, #"Lapse: Blue" do
				quote:FindFirstChild("Text").Text = string.sub("Lapse: Blue", 1, i)
				wait(0.05)
			end
			wait(0.1)
			for i = 1,10 do
				wait()
				quote:FindFirstChild("Text").TextTransparency = quote:FindFirstChild("Text").TextTransparency + 0.1
				quote:FindFirstChild("Text").TextStrokeTransparency = quote:FindFirstChild("Text").TextStrokeTransparency + 0.1
			end
			quote:FindFirstChild("Text").Text = ""
			quote:FindFirstChild("Text").TextTransparency = 0
			quote:FindFirstChild("Text").TextStrokeTransparency = 0
		end))
		
		local Blue = game.ReplicatedStorage.Gojo_Skills.Blue:Clone()
		Blue.Parent = workspace
		Blue.CFrame = hrp.CFrame * CFrame.new(0,0,-2)
		Blue.Name = plr.Name.." Lapse Blue"
		Blue:SetNetworkOwner(nil)

		local bv = Instance.new("BodyVelocity",Blue)
		bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
		bv.Velocity = ((extra1 - Blue.Position).unit) * 60
		bv.Name = "Force"
		
		for i = 1,40 do
			print(i)
			if char:FindFirstChild("AP") then
				break
			end
			wait()
		end
		if not char:FindFirstChild("AP") then
			Blue.Force.Velocity = Vector3.new(0,0,0)
			Blue["Attachment(Particle)"].Bit:Emit(80)
			Blue["Attachment(Particle)"].Circle:Emit(1)
			debris:AddItem(Blue,1)
			local Hitbox = game.ReplicatedStorage.Gojo_Skills.BlueHitbox:Clone()
			Hitbox.CFrame = Blue.CFrame
			Hitbox.Parent = workspace
			local smallgobrrr = {}
			smallgobrrr.Size = Vector3.new(0,0,0)
			local smallgobrrrin = TweenInfo.new(0.6,Enum.EasingStyle.Quint)
			local smallgobrrrtween = TweenService:Create(Hitbox,smallgobrrrin,smallgobrrr)
			smallgobrrrtween:Play()
			debris:AddItem(Hitbox,0.5)
			Hitbox.Touched:Connect(function(hit)
				local EHumanoid = hit.Parent:FindFirstChild("Humanoid")
				local EHumanoidRP = hit.Parent:FindFirstChild("HumanoidRootPart")
				if EHumanoid and EHumanoid.Health > 0 and EHumanoid.Parent.Name ~= plr.Name and not hit.Parent:FindFirstChild(plr.Name.." AlreadyDamage") then
					local echar = hit.Parent
					local AlreadyDamage = Instance.new("BoolValue")
					AlreadyDamage.Parent = echar
					AlreadyDamage.Name = plr.Name.." AlreadyDamage"
					debris:AddItem(AlreadyDamage, 1)

					EHumanoid:TakeDamage(30)

					local bf = Instance.new("BodyPosition",EHumanoidRP)
					bf.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
					bf.Position = Blue.Position
					bf.Name = "BForce"
					debris:AddItem(bf,1.5)
				end
			end)
		end
	end
end

function DomainExpansion(char,hum,hrp,plr)
	local quote = script.Quote:Clone()
	local line = true
	quote.Parent = char.Head
	local loadanims = hum:LoadAnimation(script.Domain)
	loadanims:Play(0.1,1,0.5)
	coroutine.resume(coroutine.create(function()
		wait(1)
		loadanims:AdjustSpeed(0)
	end))
	
	hrp.Anchored = true
	
	local camera = game.ReplicatedStorage.Gojo_Skills.Camera:Clone()
	camera.CFrame = hrp.CFrame * CFrame.new(3.5,1.6,0) * CFrame.Angles(0,math.rad(90),0)
	camera.Parent = workspace
	
	script.Parent:FireClient(plr,"CameraEvent1",camera,true)
	
	for i = 1, #"Domain Expansion" do
		quote:FindFirstChild("Text").Text = string.sub("Domain Expansion", 1, i)
		wait(0.05)
	end
	coroutine.resume(coroutine.create(function()
		wait(0.1)
		for i = 1,10 do
			wait()
			quote:FindFirstChild("Text").TextTransparency = quote:FindFirstChild("Text").TextTransparency + 0.1
			quote:FindFirstChild("Text").TextStrokeTransparency = quote:FindFirstChild("Text").TextStrokeTransparency + 0.1
		end
		quote:FindFirstChild("Text").Text = ""
		quote:FindFirstChild("Text").TextTransparency = 0
		quote:FindFirstChild("Text").TextStrokeTransparency = 0
	end))
	
	wait(1)
	camera.CFrame = hrp.CFrame * CFrame.new(0,1.6,-4) * CFrame.Angles(0,math.rad(180),0)
	
	for i = 1, #"Infinite Void" do
		quote:FindFirstChild("Text").Text = string.sub("Infinite Void", 1, i)
		wait(0.05)
	end
	coroutine.resume(coroutine.create(function()
		wait(0.1)
		for i = 1,10 do
			wait()
			quote:FindFirstChild("Text").TextTransparency = quote:FindFirstChild("Text").TextTransparency + 0.1
			quote:FindFirstChild("Text").TextStrokeTransparency = quote:FindFirstChild("Text").TextStrokeTransparency + 0.1
		end
		quote:FindFirstChild("Text").Text = ""
		quote:FindFirstChild("Text").TextTransparency = 0
		quote:FindFirstChild("Text").TextStrokeTransparency = 0
	end))
	
	wait(1)
	
	local sound = Instance.new("Sound")
	sound.SoundId = "rbxassetid://7616326115"
	sound.Volume = 3
	sound.Parent = hrp
	sound:Play()
	debris:AddItem(sound,sound.TimeLength + 0.2)
	
	script.Parent:FireClient(plr,"CameraEvent2",camera,true,hum)
	
	coroutine.resume(coroutine.create(function()
		repeat wait()
			
			local Line = game.ReplicatedStorage.Gojo_Skills.Line:Clone()
			Line.CFrame = hrp.CFrame * CFrame.new(math.random(-30,30),math.random(-30,30),60) *CFrame.Angles(0,math.rad(90),0)
			Line.Parent = char
			debris:AddItem(Line,0.45)
			local randomcolor = math.random(1,3)
			if randomcolor == 1 then
				Line.BrickColor = BrickColor.new("Bright red")
			elseif randomcolor == 2 then
				Line.BrickColor = BrickColor.new("Bright blue")
			elseif randomcolor == 3 then
				Line.BrickColor = BrickColor.new("Magenta")
			end

			local linegoal = {}
			linegoal.CFrame = Line.CFrame * CFrame.new(120,0,0)
			local lineinfo = TweenInfo.new(1.2,Enum.EasingStyle.Quint)
			local linetween = TweenService:Create(Line,lineinfo,linegoal)
			linetween:Play()
			
		until line == false
	end))
	
	coroutine.resume(coroutine.create(function()
		repeat wait()

			local Line = game.ReplicatedStorage.Gojo_Skills.Line:Clone()
			Line.CFrame = hrp.CFrame * CFrame.new(math.random(-30,30),math.random(-30,30),60) *CFrame.Angles(0,math.rad(90),0)
			Line.Parent = char
			debris:AddItem(Line,0.45)
			local randomcolor = math.random(1,3)
			if randomcolor == 1 then
				Line.BrickColor = BrickColor.new("Bright red")
			elseif randomcolor == 2 then
				Line.BrickColor = BrickColor.new("Bright blue")
			elseif randomcolor == 3 then
				Line.BrickColor = BrickColor.new("Magenta")
			end

			local linegoal = {}
			linegoal.CFrame = Line.CFrame * CFrame.new(120,0,0)
			local lineinfo = TweenInfo.new(1.2,Enum.EasingStyle.Quint)
			local linetween = TweenService:Create(Line,lineinfo,linegoal)
			linetween:Play()

			until line == false
	end))
	
	local Barrier = game.ReplicatedStorage.Gojo_Skills.Barrier:Clone()
	Barrier.Parent = workspace
	Barrier.Name = plr.Name.." Domain"
	Barrier.CFrame = hrp.CFrame
	
	local FreezeBarrier = game.ReplicatedStorage.Gojo_Skills.Barrier:Clone()
	FreezeBarrier.Parent = char
	FreezeBarrier.CFrame = hrp.CFrame
	FreezeBarrier.Size = Vector3.new(0.05,0.05,0.05)
	FreezeBarrier.Transparency = 1
	
	local hbgoal = {}
	hbgoal.Size = Barrier.Size
	local hbinfo = TweenInfo.new(1,Enum.EasingStyle.Linear)
	local hbtween = TweenService:Create(FreezeBarrier,hbinfo,hbgoal)
	hbtween:Play()
	
	hbtween.Completed:Connect(function()
		debris:AddItem(FreezeBarrier,0)
	end)
	
	script.Parent:FireClient(plr,"TransparencyEvent",Barrier,char)
	
	local colorgoal = {}
	colorgoal.Color = Color3.fromRGB(38, 0, 71)
	local colorinfo = TweenInfo.new(2,Enum.EasingStyle.Linear)
	local colortween = TweenService:Create(Barrier,colorinfo,colorgoal)
	colortween:Play()
	
	FreezeBarrier.Touched:Connect(function(hit)
		local EHumanoid = hit.Parent:FindFirstChild("Humanoid")
		local EHumanoidRP = hit.Parent:FindFirstChild("HumanoidRootPart")
		if EHumanoid and EHumanoid.Health > 0 and EHumanoid.Parent.Name ~= plr.Name then
			for i, a in pairs(hit.Parent:GetChildren()) do
				if a:IsA("MeshPart") or a:IsA("Part") then
					a.Anchored = true
					repeat wait()

					until Barrier.Transparency == 1
					a.Anchored = false
				end
			end
		end
	end)
	
	colortween.Completed:Connect(function()
		wait(0.2)
		local colorgoal2 = {}
		colorgoal2.Color = Color3.fromRGB(0, 0, 0)
		local colorinfo2 = TweenInfo.new(2,Enum.EasingStyle.Linear)
		local colortween2 = TweenService:Create(Barrier,colorinfo2,colorgoal2)
		colortween2:Play()
	end)
	
	local cameragoal = {}
	cameragoal.CFrame = hrp.CFrame * CFrame.new(0,1.6,-25) * CFrame.Angles(0,math.rad(180),0)
	local camerainfo = TweenInfo.new(3,Enum.EasingStyle.Quint)
	local cameratween = TweenService:Create(camera,camerainfo,cameragoal)
	cameratween:Play()
	
	cameratween.Completed:Connect(function()
		hrp.Anchored = false
		script.Parent:FireClient(plr,"CameraEvent1",camera,false)
		line = false
		loadanims:stop()
		debris:AddItem(camera,0)
		
		local core = game.ReplicatedStorage.Gojo_Skills.Core:Clone()
		core.CFrame = hrp.CFrame * CFrame.new(0,20,50)
		core.Parent = workspace
		
		wait(1.5)
		
		local paint = game.ReplicatedStorage.Gojo_Skills.Paint:Clone()
		paint.CFrame = hrp.CFrame * CFrame.new(0,10,45) * CFrame.Angles(math.rad(-90),0,0)
		paint.Parent = workspace
		paint.BillboardGui.ImageLabel.Script.Disabled = false
		
		wait(5)
		
		for i,par in pairs(core.Attachment1:GetChildren()) do
			if par:IsA("ParticleEmitter") then
				par.Enabled = false
			end
		end
		
		core.Attachment2.ParticleEmitter.Enabled = false
		core.Attachment3.ParticleEmitter.Enabled = false
		
		local paintgoal = {}
		paintgoal.Transparency = 1
		local paintinfo = TweenInfo.new(1,Enum.EasingStyle.Quint)
		local painttween = TweenService:Create(paint.Decal,paintinfo,paintgoal)
		painttween:Play()
		
		local colorgoal2 = {}
		colorgoal2.Color = Color3.fromRGB(255, 255, 255)
		local colorinfo2 = TweenInfo.new(1.5,Enum.EasingStyle.Linear)
		local colortween2 = TweenService:Create(Barrier,colorinfo2,colorgoal2)
		colortween2:Play()
		
		colortween2.Completed:Connect(function()
			wait(0.25)
			debris:AddItem(core,0)
			debris:AddItem(paint,0)
			Barrier.Transparency = 1
			Barrier.CanCollide = false
			Barrier.Glass:Emit(50)
			debris:AddItem(Barrier,2)
			script.Parent:FireClient(plr,"Done",Barrier,char)
		end)
	end)
end

function HollowPurple(char,hum,hrp,plr)
	local loadanims = hum:LoadAnimation(script.HollowPurple)
	loadanims:Play(0.1,1,1.4)
	local redclone = game.ReplicatedStorage.Gojo_Skills.RedHP:Clone()
	redclone.CFrame = hrp.CFrame * CFrame.new(5,0,5)
	redclone.Parent = workspace
	
	local blueclone = game.ReplicatedStorage.Gojo_Skills.BlueHP:Clone()
	blueclone.CFrame = hrp.CFrame * CFrame.new(-5,0,5)
	blueclone.Parent = workspace
	
	wait(0.3)
	
	local redgoal = {}
	redgoal.CFrame = hrp.CFrame * CFrame.new(0,0,-5)
	local redinfo = TweenInfo.new(1,Enum.EasingStyle.Quint)
	local redtween = TweenService:Create(redclone,redinfo,redgoal)
	redtween:Play()
	
	local bluegoal = {}
	bluegoal.CFrame = hrp.CFrame * CFrame.new(0,0,-5)
	local blueinfo = TweenInfo.new(1,Enum.EasingStyle.Quint)
	local bluetween = TweenService:Create(blueclone,blueinfo,bluegoal)
	bluetween:Play()
	
	wait(0.4)
	
	debris:AddItem(blueclone,0)
	debris:AddItem(redclone,0)
	
	local purple = game.ReplicatedStorage.Gojo_Skills.HollowPurple:Clone()
	purple.CFrame = hrp.CFrame * CFrame.new(0,0,-10)
	purple.Parent = workspace
	purple.Size = Vector3.new(0,0,0)
	
	local purplegoal = {}
	purplegoal.Size = Vector3.new(15,15,15)
	purplegoal.Transparency = 0
	local purpleinfo = TweenInfo.new(1,Enum.EasingStyle.Quint)
	local purpletween = TweenService:Create(purple,purpleinfo,purplegoal)
	purpletween:Play()
	
	coroutine.resume(coroutine.create(function()
		for i = 1 , 30 do
			local PurpleBubble = Instance.new("Part",char)
			PurpleBubble.Name = "PurpleBubble"
			PurpleBubble.Size = Vector3.new(1,1,1)
			PurpleBubble.CFrame = purple.CFrame
			PurpleBubble.Anchored = true
			PurpleBubble.CanCollide = false
			PurpleBubble.CanTouch = true
			PurpleBubble.Massless = true
			PurpleBubble.Shape = Enum.PartType.Ball
			PurpleBubble.Material = Enum.Material.Neon
			PurpleBubble.BrickColor = BrickColor.new("Magenta")
			debris:AddItem(PurpleBubble,4)

			local bubblegoal = {}
			bubblegoal.CFrame = PurpleBubble.CFrame * CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
			bubblegoal.Transparency = 1
			local bubbleinfo = TweenInfo.new(1,Enum.EasingStyle.Quint)
			local bubbletween = TweenService:Create(PurpleBubble,bubbleinfo,bubblegoal)
			bubbletween:Play()
		end
	end))
	
	wait(0.5)
	
	local BV = Instance.new("BodyVelocity",purple)
	BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
	BV.Velocity = hrp.CFrame.lookVector * 120
	BV.Name = "Force"
	
	coroutine.resume(coroutine.create(function()
		repeat
			wait()
			local Rock1 = Instance.new("Part",purple)
			Rock1.Size = Vector3.new(math.random(3,4),math.random(3,4),math.random(3,4))
			Rock1.CFrame = purple.CFrame * CFrame.new(math.random(9,10),-2,0)
			Rock1.Anchored = true
			Rock1.Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
			Rock1.Name = "PartBreak"

			local Rock2 = Instance.new("Part",purple)
			Rock2.Size = Vector3.new(math.random(3,4),math.random(3,4),math.random(3,4))
			Rock2.CFrame = purple.CFrame * CFrame.new(math.random(-10,-9),-2,0)
			Rock2.Anchored = true
			Rock2.Orientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
			Rock2.Name = "PartBreak"
			
			local para = RaycastParams.new()
			para.FilterDescendantsInstances = {Rock1,Rock2}
			para.FilterType = Enum.RaycastFilterType.Blacklist

			local ray1 = workspace:Raycast(Rock1.CFrame.p + Vector3.new(0, 1, 0),Vector3.new(0, -15, 0),para)
			if ray1 then
				Rock1.Material = ray1.Instance.Material
				Rock1.Color = ray1.Instance.Color
			end

			local ray2 = workspace:Raycast(Rock2.CFrame.p + Vector3.new(0, 1, 0),Vector3.new(0, -15, 0),para)
			if ray2 then
				Rock2.Material = ray2.Instance.Material
				Rock2.Color = ray2.Instance.Color
			end
			
			coroutine.resume(coroutine.create(function()
				wait(1)

				local pb1g = {}
				pb1g.Transparency = 1
				local pb1i = TweenInfo.new(1,Enum.EasingStyle.Quint)
				local pb1t = TweenService:Create(Rock1,pb1i,pb1g)
				pb1t:Play()

				local pb2g = {}
				pb2g.Transparency = 1
				local pb2i = TweenInfo.new(1,Enum.EasingStyle.Quint)
				local pb2t = TweenService:Create(Rock2,pb2i,pb2g)
				pb2t:Play()
				debris:AddItem(Rock1,1)
				debris:AddItem(Rock2,1)
			end))
		until purple.Transparency == 1
	end))
	
	purple.Anchored = false
	
	purple.Touched:Connect(function(hit)
		local EHumanoid = hit.Parent:FindFirstChild("Humanoid")
		local EHumanoidRP = hit.Parent:FindFirstChild("HumanoidRootPart")
		if EHumanoid and EHumanoid.Health > 0 and EHumanoid.Parent.Name ~= plr.Name and not hit.Parent:FindFirstChild(plr.Name.." AlreadyDamage(HP)") then
			local echar = hit.Parent
			local AlreadyDamage = Instance.new("BoolValue")
			AlreadyDamage.Parent = echar
			AlreadyDamage.Name = plr.Name.." AlreadyDamage(HP)"
			debris:AddItem(AlreadyDamage, 1)

			EHumanoid:TakeDamage(80)
		end
	end)
	
	coroutine.resume(coroutine.create(function()
		wait(6)
		purple.Transparency = 1
		purple.Anchored = true
		debris:AddItem(purple,1)
	end))
end

script.Parent.OnServerEvent:Connect(function(plr,move,extra1)
	local char = plr.Character
	local hrp = char.HumanoidRootPart
	local hum = char.Humanoid
	
	if move == "Reversal Red" then
		ReversalRed(char,hum,hrp,plr)
	elseif move == "Lapse Blue" then
		LapseBlue(char,hum,hrp,extra1,plr)
	elseif move == "Domain Expansion" then
		DomainExpansion(char,hum,hrp,plr)
	elseif move == "Hollow Purple" then
		HollowPurple(char,hum,hrp,plr)
	end
end)

I managed to fix the isuse myself tho thanks for helping :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.