I have tried everything upon changing the code, looking at the object browser and searching up similar events on other websites, but nothing had came across the same event as this.
Im not asking you to do all the work, but if you could explain to me what I did wrong and how I could fix it then that would be appreciated!
I have made a protection bubble out of a Ball that surrounds me inside it when I press the Q button. I wanted it to kill players that tried to touch it by looking if my localplayer name was theirs, and if it wasnt, it would kill them, but I have not used this script yet. Ty for your help and time!
Code:
local player = game.Players.LocalPlayer
local character = player.Character
local terrain = game.Workspace.Terrain
local ammo = 1
local x = Instance.new("Part")
x.Size = Vector3.new(48,48,48)
x.Transparency = 0.2
x.Shape = "Ball"
x.CanCollide = false
x.Anchored = true
x.BrickColor = BrickColor.new("Electric blue")
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
local p = Instance.new("ParticleEmitter")
local f = Instance.new("ForceField")
local s = Instance.new("Smoke")
local sl = Instance.new("SurfaceLight")
local sp = Instance.new("Sparkles")
local color1 = Color3.new(121, 244, 255)
local color2 = Color3.new(226, 0, 255)
p.Parent = x
p.Color = ColorSequence.new(color1, color2)
p.Rate = 250
p.Speed = NumberRange.new(25)
p.Size = NumberSequence.new(5)
p.LightEmission = 100
p.VelocitySpread = 808080
s.Parent = x
s.Color = Color3.new(75, 255, 234)
sl.Parent = x
sl.Range = 60
sp.Parent = x
sp.SparkleColor = Color3.new(144, 25, 255)
f.Parent = x
game:GetService("UserInputService").InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
local animation = Instance.new("Animation")
local humanoid = script.Parent:WaitForChild('Humanoid')
animation.AnimationId = "http://www.roblox.com/asset/?id=855830361"
humanoid:LoadAnimation(animation):Play()
wait(1)
if ammo == 1 then
ammo = 0
local clx = x:Clone()
local clf = f:Clone()
clx.Parent = game.Workspace
clx.CFrame = character.UpperTorso.CFrame * CFrame.new(0,0,0)
clf.Parent = clx
clx.Touched:FindFirstChild('Humanoid')
if Humanoid.Parent.Parent.Name == "iizWishzii" then return
elseif Humanoid.Parent.Parent.Name == "iizWishzii" then
Humanoid.Health = 0
end
game.Debris:AddItem(clx, 10)
wait(10)
ammo = 1
end
end
end)
This is the part of code that isnt working.
clx.Touched:FindFirstChild('Humanoid')
if Humanoid.Parent.Parent.Name == "iizWishzii" then return
elseif Humanoid.Parent.Parent.Name ~= "iizWishzii" then
Humanoid.Health = 0
end

4 comments
so u edited the code on line 59
What line showed the error? If an error was return though, could you please provide it? :) Thanx C;
clx must be a base part and Touched is a event which is a RBXScriptSignal. The RBXScriptSignal does not have a FindFirstChild function.
Ohhh Ty all! :3