this is my script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Debris = game:GetService('Debris')
local Remote = ReplicatedStorage.Storage.RemoteEvents.FireBallEvent
local FlameShot = ReplicatedStorage.FlameShot
local Damage = 30
Cooldown = 10
local ServerDebounces = {}
Remote.OnServerEvent:Connect(function(plr, Mouse)
if not ServerDebounces[plr] then
ServerDebounces[plr] = true
local Char = plr.Character or plr.CharacterAdded:Wait()
local FlameShotClone = FlameShot:Clone()
FlameShotClone.CFrame = Char.HumanoidRootPart.CFrame * CFrame.new(0,0,-3)
FlameShotClone.Parent = workspace
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyVelocity.Velocity = Mouse.lookVector
BodyVelocity.Parent = FlameShotClone
spawn(function()
for i = 0, 1000 do
wait()
FlameShotClone.Size = FlameShotClone.Size + Vector3.new(0.07,0.07,0.07)
BodyVelocity.Velocity = Mouse.lookVector*i
end
end)
ServerDebounces[plr] = false
Debris:AddItem(FlameShotClone, 10)
local Debounce = true
FlameShotClone.Touched:Connect(function(h)
if h.Parent:FindFirstChild('Humanoid') and h.Parent.Name ~= plr.Name and Debounce then
Debounce = false
local Enemy = h.Parent.Humanoid
Enemy:TakeDamage(Damage)
FlameShotClone.Transparency = 1
BodyVelocity:Destroy()
FlameShotClone.Effect.Speed = NumberRange.new(8,8)
wait(10)
FlameShotClone.Effect.Enabled = false
FlameShot.Cooldown = true
wait(10)
FlameShotClone:Destroy()
wait(2)
Debounce = true
end
end)
end
end)
5 comments
that is, unless you want to do an actual "stun" action, where the character vibrates...
yes I actually want the actual "stun" action when the character vibrates and this is ok too. so players in my game can actually noticed that the person is stunned and also What about the particle emitter?
That can be put in the tool and once the touch happens you just need to clone the partical emmiter acivate the clone emmiter and then destroy it after about a second
My fireball isn't a tool. It's a keybind. add me on discord talon#6473 so we can talk more.
kk