local Tool = script.Parent local Cooldown = false local CDTime = 15 local Damage = 40 local KnockbackSpeed = 135 local your_animation = Instance.new("Animation", script) your_animation.AnimationId = "rbxassetid://4874446584" local your_animation2 = Instance.new("Animation", script) your_animation2.AnimationId = "rbxassetid://4874439977" local repstore = game:GetService("ReplicatedStorage") local your_animation3 = Instance.new("Animation", script) your_animation3.AnimationId = "rbxassetid://4874543799"
Tool.RemoteEvent.OnServerEvent:Connect(function(player) if Cooldown then return end
spawn(function() Cooldown = true wait(CDTime) Cooldown = false end)
local Core = game.ReplicatedStorage.Core:Clone() Core.Parent = workspace local Weld = Instance.new("Weld",Core) Weld.Part0 = Core
Weld.C1 = CFrame.new(0,-.5,0)
local animation = player.Character.Humanoid:LoadAnimation(your_animation) animation:Play() Tool.Rasengan:Play() Weld.Part1 = player.Character.LeftHand player.Character.Humanoid.WalkSpeed = 0 player.Character.Humanoid.JumpPower = 0 player.Character.HumanoidRootPart.Anchored = true
for i = 0,1, 1/10 do wait() -- as long as this number is between 0 and 1. 1/100 can be changed to 1/any number. higher numbers make it slower Core.Size = Vector3.new(.2,.2,.2):Lerp(Vector3.new(1,1,1),i) -- this will find a size between 2 sizes. where 0 is the lowest size and 1 is the biggest end
wait(2) animation:Stop() local animation2 = player.Character.Humanoid:LoadAnimation(your_animation2) animation2:Play() player.Character.HumanoidRootPart.Anchored = false player.Character.Humanoid.WalkSpeed = 25 player.Character.Humanoid.JumpPower = 50
Core.Touched:Connect(function(hit) if hit and hit.Parent == player.Character then return end if hit and hit.Parent:FindFirstChild("Humanoid") then local Enemy = hit.Parent:FindFirstChild("Humanoid")
Enemy:TakeDamage(Damage)
if Enemy.Health <= 0 then
print("hello")
player.leaderstats.Kills.Value = player.leaderstats.Kills.Value + 1
player.Level.Current.Value = player.Level.Current.Value + 25
end
Tool.Explosion:Play()
Tool.Rasengan:Stop()
animation2:Stop()
Core:Destroy()
player.Character.Humanoid:UnequipTools()
local Particle = game.ReplicatedStorage.RasenganP:Clone() --I suspect the main problem of the script is here.
Particle.Parent = Enemy.Parent:WaitForChild("HumanoidRootPart")
local weld2 = Instance.new("Weld")
weld2.Parent = Enemy.Parent:WaitForChild("HumanoidRootPart")
weld2.Part0 = Enemy.Parent:WaitForChild("HumanoidRootPart")
weld2.Part1 = Particle
local BodyVelocity = Instance.new('BodyVelocity',hit.Parent.HumanoidRootPart)
local animation3 = hit.Parent.Humanoid:LoadAnimation(your_animation3)
animation3:Play()
BodyVelocity.Velocity = player.Character.HumanoidRootPart.CFrame.lookVector * KnockbackSpeed
BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
game.Debris:AddItem(BodyVelocity,.4)
player.Character.Humanoid.WalkSpeed = 16
player.Character.Humanoid.JumpPower = 50 --till here
local TweenService = game:GetService("TweenService")
local tweeningInfo = TweenInfo.new(
1, -- Length
Enum.EasingStyle.Elastic,
Enum.EasingDirection.Out,
2, -- Number of Repetition
true, -- Repeat or no
0.1-- Delay between each tween
)
local PartProperties = {
Size = Vector3.new(50,50,50),
Transparency = 0.5,
}
local Tween = TweenService:Create(Particle,tweeningInfo,PartProperties)
Tween:Play()
wait(1.5)
Particle:Destroy()
end
end)
spawn(function() wait(8) animation2:stop() Core:Destroy() Tool.Rasengan:Stop() Tool.Explosion:Stop() player.Character.Humanoid:UnequipTools() end) end)
https://www.youtube.com/watch?v=Ep7LeUEVUao this is the effect im trying to create
but instead mine ends up like this https://gyazo.com/ad6022673e8196f5a0f9283b2ddcf394
I have tried switching Part1 and Part0 because of the fact that the player is being "welded" or "moved" to the balls exact position after it parents to the workspace. I have tried parenting and moving the ball to the humanoidrootpart of the player that im hitting, but neither of these options worked. I've tried removing C1 and C0 but that didnt work either. I thought that maybe the body velocity was interferring with it but even removing that didnt help highlight the problem whatsoever.
I have been trying to solve this issue for over 3 days and i would greatly appreciate some assistance and some kind of highlight as to what is going on here. I not only asked this question in scriptinghelpers discord server but in 3 other discord servers and all the solutions everyone offered didnt help.

2 comments
I don't really understand what you're trying to achieve.
Please place the script inside lua and give a clear definition, I don't know what you mean either.