I have been testing around and i can't find anyway to add particles to this script. ;-;
i'm a noob at this website and at scripting so could any of you help?
I'm also looking for ways for multiple blocks to come out too?
local player = game.Players.LocalPlayer
repeat wait() until player ~= nil
bin = script.Parent
me = script.Parent.Parent.Parent
enabled = true
local animation = script.Parent.Fireballz
repeat wait() until animation ~= nil
local Humanoid = player.Character.Humanoid
repeat wait() until Humanoid ~= nil
local animTrack = Humanoid:LoadAnimation(animation)
repeat wait() until animTrack ~= nil
function mouseclicky(mouse)
if not enabled then
return
end
if player == nil then return end
enabled = false
animTrack:Play()
local x = Instance.new("Part")
x.Material = "Concrete"
x.BrickColor = BrickColor.new("Bright red")
x.Size = Vector3.new(5, 5, 5)
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Shape = "Ball"
x.Name = me.Name
x.CanCollide = true
x.Transparency = 0
x.Parent = game.Workspace
x.CFrame = me.Character.Torso.CFrame*CFrame.new(0, 0, -8)
game.Debris:AddItem(x, 6)
x.Anchored = false
local velocityz = Instance.new("BodyVelocity")
velocityz.maxForce = Vector3.new(math.huge, math.huge, math.huge)
velocityz.velocity = me.Character.Torso.CFrame.lookVector*60
velocityz.Parent = x
x.Touched:connect(function(h)
if h.Parent.Name ~= player.Character.Name and h.Parent:FindFirstChild('Humanoid') then
x:Destroy()
h.Parent:FindFirstChild('Humanoid'):TakeDamage(10)
end
end)
wait(3)
enabled = true
end
enabled = true
function selectz(mouse)
mouse.Button1Down:connect(function() mouseclicky(mouse) end)
end
bin.Selected:connect(selectz)
