You're simply setting the position wrong.
Use a Vector3 set the position of a part.
local part = script.Parent
part.ClickDetector.MouseClick:connect(function()
local awesomeBrick = game.Lighting["Awesome Brick"]:clone()
awesomeBrick.Parent = game.Workspace
awesomeBrick.Position = Vector3.new(12.206, 0.5, -104.321)
end)
You should also not use Lighting because Lighting is not a storage service and it's annoying. Oh, and when ending an anonymous function you need a ) after the end).
Optional Changes,
Besides not using Lighting, I would suggest setting the part's CFrame instead of it's position. This is so the part is able to be placed under and inside other parts. In your case this might not be necessary, but I think it's useful to learn.
local part = script.Parent
part.ClickDetector.MouseClick:connect(function()
local awesomeBrick = game.ServerStorage["Awesome Brick"]:Clone()
awesomeBrick.Parent = game.Workspace
awesomeBrick.CFrame = CFrame.new(12.206, 0.5, -104.321)
end)
This could be improved upon even more by using WaitForChild, but if you really want to know how, just ask.
Good Luck!
If I helped, please don't forget to accept my answer.
1 comment
If you had a bad title, then you should give it more detail. Not spam important scripting words in it.