i tried to fix my skill script, but it not give stats
script.Parent.OnServerEvent:Connect(function(plr)
local Slash = game.ReplicatedStorage.Slash:Clone()
Slash.Parent = workspace
Slash.CanCollide = false
Slash.Anchored = false
Slash.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5) * CFrame.fromEulerAnglesXYZ(1.8,0,0)
Slash.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= plr.Name then
local Ball = game.ReplicatedStorage.Slash:Clone()
Ball.Parent = workspace
Ball.CFrame = Slash.CFrame * CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(math.random(-110,110),math.random(-110,110),math.random(-110,110))
Ball.CanCollide = false
Ball.Anchored = true
Slash:Destroy()
local creator = Instance.new("ObjectValue")
local Debris = game:GetService("Debris")
creator.Name = "creator"
creator.Value = script.Parent.Parent.Parent
Debris:AddItem(creator, 2)
creator.Parent = hit.Parent.Humanoid
hit.Parent.Humanoid:TakeDamage(5)
for i = 1,18 do
wait(.05)
Ball.Size = Ball.Size + Vector3.new(2,2,2)
Ball.Transparency = Ball.Transparency + 0.05
end
Ball:Destroy()
end
end)
local BV = Instance.new("BodyVelocity",Slash)
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = plr.Character.HumanoidRootPart.CFrame.LookVector * 80
end)
2 comments
so you know how to fix it? :( sorry im new
and do i need to do anything with skill script?