Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I've made a block spawn in, but why can't I make it disappear?

So it'll spawn in the block I have, but afterwards the destroy command won't do it's job.

local F1 = game.ServerStorage.Skill3:WaitForChild("1Fire")
		local F1C = F1:Clone()
		F1C.CFrame = Player.HumanoidRootPart.CFrame * CFrame.new(0,-2,0)
		F1C.Parent = workspace
		Debounce = false
		Touch = F1C.Touched:Connect(function(hit)
		if Debounce == true then return end
			Debounce = true
			if hit.Parent:FindFirstChild("Humanoid") then
				if hit.Parent.Name ~= player.name then
					hit.Parent.Humanoid:TakeDamage(60)
						wait (0.4)
							F1C:Destroy()
				end
			end
		end)

1 answer

✓ Accepted answer

I think your issue is with the end functions.


local F1 = game.ServerStorage.Skill3:WaitForChild("1Fire")
local F1C = F1:Clone()
F1C.CFrame = Player.HumanoidRootPart.CFrame * CFrame.new(0,-2,0)
F1C.Parent = workspace
local Debounce = false
Touch = F1C.Touched:Connect(function(hit)
if Debounce == true then return end
     Debounce = true
     if hit.Parent:FindFirstChild("Humanoid") then
             if hit.Parent.Name ~= player.name then
                    hit.Parent.Humanoid:TakeDamage(60)
                    wait (0.4)
                    F1C:Destroy()
              end
       end
end

You put a close bracket on first end, but there aren’t any functions to close. Instead, you have three if statements to close.

This discussion is preserved as it was. New answers, comments, and votes are closed.