i made a molotov which i couldnt finish cause the lack of my raycast knowledge but now im trying again and now it only detects players character
local exist = 30
local part = script.Parent
print(part)wait(0.2)
local impact = false
while impact == false do
wait(0.05)local raycastresult = Ray.new(script.Parent.Position,Vector3.new(0,part.Size.Y / 2 + .05,0 ))
local hit, hitpos = workspace:FindPartOnRayWithIgnoreList(raycastresult,{script.Parent})if hit then
local DesiredCFrame = CFrame.new(hitpos, hitpos + CFrame.new(raycastresult.Origin, raycastresult.Direction).LookVector)
impact = true
print(“hitted”)
local cat = script.Parent.Explode:Clone()local fire = Instance.new("Part") cat.Parent = fire cat:Play() fire.Parent = game.Workspace game:GetService("Debris"):AddItem(fire,exist) fire.CanCollide = false fire.Transparency = 1 fire.Anchored = true fire.CFrame = DesiredCFrame fire.Size = Vector3.new(10,2,10) local children = script.Parent:GetChildren() for i = 1,#children do if children[i].ClassName == "ParticleEmitter" then children[i].Parent = fire children[i].Enabled = true end end script.Parent:Destroy()
end
end