I want multiple blocks to be clickable across my game, and if you click it i want it to paste a model from ServerStorage above those clickable blocks.
local storage = game:GetService("ServerStorage") local part = storage["squareGreen2"]:clone() -- Change "Part" to the part name. part.Parent = game.Workspace part.Position = Vector3.new(2.25, 688.658, 665.099)
If I am understanding what you are trying to say correctly, you need to run a for loop at the start of the game to get all of those clickable blocks to get their position once clicked.
It's very hard to explain, but the solution is simple:
local storage = game:GetService("ServerStorage") for i,v in pairs(game.Workspace:GetChildren()) do if v.Name == "ClickableBlock" then v.ClickDetector.MouseClick:connect(function() local part = storage["squareGreen2"]:clone() part.Parent = game.Workspace part.Position = v.Position end end end
I hope you understand what I meant, and I hope I understood your question correctly! Feel free to message me if you're still confused or that isn't what you meant. :)