I wanted it so that the knife touches one of those black parts and you fall down and then the knife is destroyed and you don’t have it no more. Is there any way i can make it so that the knife is destroyed after one of the black parts is touched. https://gyazo.com/ddb7d2b7cf5b4bab91a4231237e99b99
Here is the code for the black parts:
local knife = game.StarterPack["Throwing Knife"]:Clone()
local realknife = game.StarterPack["Throwing Knife"]
local Fall = game.Workspace.FallOff
if hit.Parent:FindFirstChild("Humanoid") then
Fall.Transparency = 0.4
Fall.CanTouch = false
Fall.CanCollide = false
wait(2)
Fall.Transparency = 0
Fall.CanTouch = true
Fall.CanCollide = true
end
end
script.Parent.Touched:Connect(U)
local tool = script.Parent
local handle = tool.Handle
handle.Touched:Connect(function(hit)
if hit.Name == "Part" then --Change name if necessary.
tool:Destroy()
end
end)
Tool instances don’t have a “.Touched” event but as their primary “Handle” instances are BasePart instances they have a “.Touched” event.
Well i tried using this script, there were no errors but the tool was still there.
local knife = game.StarterPack["Throwing Knife"]:Clone()
local realknife = game.StarterPack["Throwing Knife"]
local Fall = game.Workspace.FallOff
if hit.Parent:FindFirstChild("Humanoid") then
wait(0.5)
Fall.Transparency = 0.4
Fall.CanTouch = false
Fall.CanCollide = false
wait(2)
Fall.Transparency = 0
Fall.CanTouch = true
Fall.CanCollide = true
local handle = realknife.Handle
handle.Touched:Connect(function(hitted)
if hitted.Name == "target4" then --Change name if necessary.
realknife:Destroy()
end
end)
end
end
script.Parent.Touched:Connect(U)