Trying to make it where when a Player presses 'Q', the model clones to the workspace and the player can place it wherever they please on a 1 stud increment. I keep getting the error: "Unable to cast double to CoordinateFrame"
local model = game.ReplicatedStorage.Model
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "q" then
local newModel = model:Clone()
newModel.Parent = game.Workspace
newModel:SetPrimaryPartCFrame(mouse.X,mouse.Y)
end
end)
