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

This part spawning script just doesnt work?

i am trying to make this part spawn a part when pressed ( with cooldown ), please explain why it doesnt work:

UserInputService = game:GetService("UserInputService")

local rannum = 1

local debounce = true

local cooldown = 0.5

UserInputService.InputBegan:Connect(function(key, typing)

if typing then return end 

local button = Enum.KeyCode.Delete

if key.KeyCode == button then

	if debounce then 

		debounce = false 

        if rannum == 1

	    then local poopspawned = 0

        while true do

				if poopspawned >= 1 then

					wait()

			poopspawned = poopspawned + 1

			local poop = Instance.new("Part", game.Workspace)

			time()

			poop.Color = Color3.new(0,0,0)

			poop.Position = Vector3.new(0,15,0)

		end

		wait(2) 

				debounce = true

			end

		end

	end

end

end)

1 answer

✓ Accepted answer

how about clone a part in replaced storage it will be easier to make due to the colour, texture and mesh is same what you need to do is adjust the CFrame

1 comment

0

Oh yeah, didnt think of that. Thanks!

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