I'm making an Undertale based game. For the undyne fight, I made the shield that she gives you in Undertale. I also made a spear attack for the boss fight, but when the spear hits the shield, it doesn't disappear. Heres my script:
script.Parent.Touched:Connect(function(hit)
local Shield = hit.Parent:FindFirstChild("Shield")
if Shield then
print("Shield")
script.Parent:Destroy()
else
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
if Humanoid then
print("Humanoid")
local Player = game.Players:GetPlayerFromCharacter(Humanoid.Parent)
Player:Kick("Pathetic...")
end
end
end)
