I can’t tell what I did wrong…
local Thrower = script.Parent
local Debris = game:GetService(“Debris”)
local function hiter(kill, hit)
if hit.Parent:FindFirstChild(“Humanoid”) then
local character = hit.Parent
kill:Destroy()
character.Humanoid.Health = character.Humanoid.Health - (character.Humanoid.MaxHealth /3)
end
end
local function createfireball()
local fireball = Instance.new(“Part”)
fireball.Position = Thrower.Position + Vector3.new(0,-2,0)
fireball.Shape = “Ball”
fireball.Size = Vector3.new(2,2,2)
fireball.BrickColor = BrickColor.Red()
fireball.CanCollide = false
fireball.Parent = workspace
fireball.Touched:Connect(function(hit)
hiter(hit, fireball)
end)
local fire = Instance.new("Fire",fireball)
local force = Instance.new("BodyForce")
force.Force = Vector3.new(0,-10,0)
force.Parent = fireball
Debris:AddItem(fireball, 1)
end
while true do
createfireball()
wait(1)
end
createfireball()
the script kills the player, but it’s not killing the player