Item placement issue

I recently wrote a topic about how to place a tool in a certain position. I figured out how to do so but there is a slight issue.

Whenever I place the block in the right position, it does not appear: it physically is there and I can retrieve it but it is not physically visible. Is there anyway to fix this? Here’s the actual code:

h = script.Parent -- H is a model
vis = h.visible -- Vis is a BoolValue
b = game.ServerStorage:WaitForChild'Block' -- Block is the tool
bC = nil -- blockCheck
a = false -- Active

h.b.Touched:Connect(function(part)
if not a then
	a = true
	bC = part.Parent:FindFirstChild("Block")
	if not vis.Value and bC then
		bC:Destroy()
		vis.Value = true
	end
	wait(.2)
	a = false
end
end)

h.Casing.ClickDetector.MouseClick:Connect(function(player)
if not a then
	a = true
	if vis.Value then
		local nB = b:Clone()
		nB.Parent = player.Backpack
		player.Character.Humanoid:EquipTool(nB)
		vis.Value = false
	end
	wait(.2)
	a = false
end
end)

I can supply pictures of the layout of the script, and how it is positioned in the workspace is needed. Thank you in advance!

Is this a serverscript or a localscript? If it’s a localscript then are you looking from the server or the client?

1 Like

It’s a server script.

–30 characters–

Is the blocks transparency set to 1? And does vis change its transparency?

Vis changes the transparency of the block when its placed so it appears in the position it’s supposed to be in, and then when it’s clicked, it will remove the block and set its transparency back to 1.

I’m really confused on what this code is supposed to do because the naming of variables is horrible

I’m sorry. I’m not very good at naming variables. Would you like me to change them to be more practical?

I can’t find the issue, sorry.