local PartA = script.Parent
local PartB = game.Workspace.PartB
local ClickDetector = PartA:WaitForChild("ClickDetector")
local Debounce = false
ClickDetector.MouseClick:Connect(function(Player)
if not Debounce then
Debounce = true
PartB.Transparency = 0
else
Debounce = false
PartB.Transparency = 1
end
end)
local PartA = script.Parent
local PartB = game.Workspace.PartB
local ClickDetector = PartA:WaitForChild("ClickDetector")
local Debounce = false
ClickDetector.MouseClick:Connect(function(Player)
if not Debounce then
Debounce = true
if PartB.Transparency == 0 then
PartB.Tranparency = 1
elseif PartB.Transparency == 1 then
PartB.Tranparency = 0
end
wait(1)
Debounce = false
end
end)
It’s just that the part is still has collision even when transparent, so I changed the script so that it does not have collision for when it’s transparent.
This will work. Add the part you want to show up when you click into ReplicatedStorage, and do:
local replicatedStorage = game:GetService("ReplicatedStorage")
local partThatWillAppear = replicatedStorage.Part
local brick = script.Parent -- add a script into the block
brick.ClickDetector.MouseClick:Connect(function()
local clone = partThatWillAppear:Clone()
clone.Parent = workspace
clone.Position = Vector3.new() -- add the values
end)