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

Very simple script, I'm probably doing something stupid?

I'm making a coin pusher. Don't judge me.

Anyways, I'm trying to make it so when you click the brick, a coin pops down underneath it. I was going to change the position later but can't even get this beginnings of it to work yet. Here's what I have so far.

Insert = script.Parent

function onClicked()
            Coin = Instance.new("Part")
			Coin.Shape = ("Cylinder")
			Coin.Size = Vector3.new(0.2, 2, 2)
			Coin.Position = Vector3.new(-13, 81, -10.3)
			Coin.Reflectance = 0.61
			Coin.Name = "Working"
			wait(1)
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

No output, nothing happens when clicked.

1 comment

0

You did not parent the part.

1 answer

✓ Accepted answer

You made a simple mistake! You never parented it! Add Coin.Parent = Workspace after line 9!

1 comment

0

Ahh I knew it was something I had missed! Thanks!

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