I am trying to animate a model with cframe using setprimary part and I have no idea how to connect the script with clickdetectors.
I'm not great at this sort of thing, but, you could try something along the lines of:
script.Parent.ClickDetector.MouseClick:Connect(function() local modelname = game.Workspace:FindFirstChild("INSERTNAMEHERE") local pos = modelname.PrimaryPart.CFrame = CFrame.new(0, 0, 0) --insert position here modelname:SetPrimaryPartCFrame(pos) --sets the position stated in variable pos end)
I'm not sure wether this is what you where looking for, would be helpful if you attached the script that you currently have.