Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spawn(function()
- while fireball.Parent == workspace do
- while wait(.01) do
- for _,v in pairs(workspace:GetChildren()) do
- if v.Name == "kamehamehaBall" then
- local clashPart2 = v:FindFirstChild("part3")
- if clashPart2 and clashPart2 ~= part3 then
- local magnitude = (part3.Position - clashPart2.Position).magnitude
- if magnitude <3 then
- print("in range")
- local canClash2 = v:FindFirstChild("canClash")
- if canClash2 and canClash2.Value == true then
- if not v:FindFirstChild("isClashing") and clashing == false then
- print("able to clash")
- local plr2Val = v:FindFirstChild("clashParent")
- if plr2Val and plr2Val.Value ~= nil and plr2Val.Value ~= plr then
- local plr2 = plr2Val.Value
- local isClash1 = Instance.new("BoolValue",plr2.Character)
- isClash1.Name = "isClashing"
- isClash1.Value = true
- isClash1:Clone().Parent = char
- --clashing = true
- print(plr.Name.." is clashing with "..plr2.Name)
- local beam1 = fireball.bigBeam
- local beam2 = fireball.smallBeam
- local part3 = fireball.part3
- local part4 = fireball.part4
- local beam3 = v.bigBeam
- local beam4 = v.smallBeam
- local part5 = v.part3
- local part6 = v.part4
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end)
- char.ChildAdded:Connect(function(child)
- if child.Name == "isClashing" then
- clashing = true
- end
- end)
- char.ChildRemoved:Connect(function(child)
- if child.Name == "isClashing" then
- clashing = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement