i am making a game were you click to make a frame and that frame should move to the center but i found a problem i taged the part what i copy with tag editor but the function that i made it to do dosent work so i get a question does collection service work on copied parts if do check the scripts what i made and please help me fix them this just copies the frame
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()
local Object = game.StarterGui.Dot
mouse.Button1Down:Connect(function()
local copy = Object:Clone()
copy.Parent = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame
copy.Position = UDim2.new(0,mouse.X - 10, 0,mouse.Y + 25 )
end)
and this one should move tagged parts
local ColletctionService = game:GetService("CollectionService")
local Dot = ColletctionService:GetTagged("Dot")
for _, Dot in pairs(Dot) do
Dot:TweenPosition(UDim2.new(0.495, 0,0.239, 0),"Out","Sine",1)
end
Thank you for reading hope you can help me

3 comments
Use CollectionService:GetInstanceAddedSignal() to track new tagged instances https://developer.roblox.com/api-reference/function/CollectionService/GetInstanceAddedSignal
and how do i do that?
The link he provided tells you exactly how to use it.