serverscriptservice

event = game.ReplicatedStorage.Kamehameha.Start
event2 = game.ReplicatedStorage.Kamehameha.Launch

function ball(ctr, hum, whereto, plr)
	start = Instance.new("Part")
	start.Parent = ctr
	start.Name = "Kamehamehaattack"
	start.Shape = "Ball"
	start.Size = Vector3.new(2,2,2)
	start.BrickColor = BrickColor.new("Toothpaste")
	start.Material = "Neon"
	start.CanCollide = false
	start.Anchored = true
	start.Transparency = .1
	event:FireClient(plr)
	atk = ctr:FindFirstChild("Kamehamehaattack")
	for i = 1, 50 do
		atk.Size = atk.Size + Vector3.new(.1,.1,.1)
		atk.CFrame = atk.CFrame:lerp(ctr.UpperTorso.CFrame * CFrame.new(0, 0, -5), i * 2)
		wait()
	end
	while ctr:FindFirstChild("Kamehameha") do
		start.CFrame = ctr["LeftHand"].CFrame * CFrame.new(-2,0,0)
		wait()
	end
	print('send')
end

function launch(ctr,hum, whereto, plr)
	print('CAUGHT')
	blast = Instance.new("Part")
	blast.Shape = "Cylinder"
	blast.BrickColor = BrickColor.new("Toothpaste")
	blast.Transparency = 0.1
	blast.Material = "Neon"
	blast.CFrame = CFrame.new(whereto)
	blast.CFrame = CFrame.new(blast.CFrame.Position, whereto) * CFrame.Angles(0, math.rad(90), 0)
	blast.Anchored = true
	blast.Size = Vector3.new(75,5,5)
	blast.CanCollide = false
	blast.Parent = ctr
	blast.Name = "blast"
	event2:FireClient(plr)
	wait(3)
	blast:Destroy()
	atk:Destroy()
end

event.OnServerEvent:Connect(function(plr, ctr, hum, whereto)
	print('recieved!')
	ball(ctr, hum, whereto, plr)
	
end)
event2.OnServerEvent:Connect(function(plr, ctr, hum, whereto)
	launch(ctr, hum, whereto, plr)
end)

tool script

event = game.ReplicatedStorage.Kamehameha.Start
event2 = game.ReplicatedStorage.Kamehameha.Launch
plr = game.Players.LocalPlayer
ctr = plr.Character or plr.CharacterAdded:Wait()
hum = ctr:WaitForChild("Humanoid")
uis = game:GetService("UserInputService")
tool = script.Parent
hold = false
m = plr:GetMouse()
charge = Instance.new("Animation")
charge.AnimationId = "https://www.roblox.com/asset/id?=".."2787315889"
chargetrack = hum:LoadAnimation(charge)
launch = Instance.new("Animation")
launch.AnimationId = "https://www.roblox.com/asset/id?=".."2787303003"
launchtrack = hum:LoadAnimation(launch)
db = true
hax = false


tool.Equipped:Connect(function()
	hold = true
end)

tool.Unequipped:Connect(function()
	hold = false
	if hax == true then
		event:FireServer(ctr, hum, m.Hit.p)
	end
end)

m.Button1Down:Connect(function()
	print('clicked')
	if hold == true and db == true then
		event:FireServer(ctr, hum, m.Hit.p)
		db = false
		hax = true
		wait(5)
		db = true
	end
end)


m.Button1Up:Connect(function()
	if hold == true and hax == true then
		event2:FireServer(ctr, hum, m.Hit.lookVector * 37.5, plr)
	end
end)


event.OnClientEvent:Connect(function(plr)
	chargetrack:Play()
	wait(3)
	hax = false
end)

event2.OnClientEvent:Connect(function(plr)
	chargetrack:Stop()
	launchtrack:Play()
end)

plr.CharacterAdded:Connect(function(char)
	ctr = char
end)

I can see my start kamehameha part but not my blast part.

1 comment

0

Try setting the size of the blast part before its CFrame