Item will not show up when cloned from lighting to workspace with no error

Hello, I am creating a survival game. I am trying to make an ore drop when the user mines an ore with the pickaxe.
The problem is that the ore is not dropping with no error. The ore is stored in lighting as a tool.
I don’t even know if the tool is cloning or not because it does not seem to clone in lighting or workspace.
I have already tried lots of things including removing ore_type:Destroy() from my code but it still does not work.
Here is my code:

	local ore_type = hit.Parent:FindFirstChild('Ore_Type')
	if hit.Parent:FindFirstChild('Humanoid') ~= nil then
	if hit.Locked == false and hit ~= nil then
		hit.Anchored = false
		if ore_type ~= nil then
			local ore = game.Lighting.items[ore_type.value]:Clone()
			local position = hit.Parent.Box.Position 
			ore.Handle.Position =
			ore.Parent = game.Workspace

It does not output any errors at all which makes it even more difficult to solve.
Any Help would be great!

1 Like

Try putting print()'s in between each step to see which steps run and which don’t.

Also why are you putting tools in Lighting? You can put them in ReplicatedStorage or ServerStorage. It’s better management.

1 Like

Are you running it on the server?

Yes I am running it on server.

I tried your suggestion and all steps did run, but it still does not come from ReplicatedStorage or anywhere else I put it.


Thanks to everyone who tried to solve this.
I found out I was setting the position Incorrectly.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.