I am trying to make a button that when clicked it will clone a model and will be positioned at a coordinate frame. However it seems to not be working. I have put it through printing tests and it all runs well but the output says "Could not cast vector3 coordinate". Because of this I changed it to cframe, here is the code.
script.Parent.MouseClick:Connect(function(plr)
if game.Workspace.Data.Buildingname.Value == ("ArcherHut") then -- Checks for data
local Clone = game.Workspace.ArcherHut:Clone()
Clone.Parent = game.Workspace
Clone.Name = ("Tile1")
Clone:SetPrimaryPartCframe(CFrame.new(-731.5, 6.5, -2676.5)) -- What's not working
end
end)

1 comment
I tried your method and the output just says "SetPrimaryPartCframe is not a valid member of "Workspace.ArcherHut1" "