I'm trying to make the model 'Jericho 1' move as a whole (since there's more than one brick in the model) so I've set the Primary Part to Warhead1. Anytime I press the button, all I get is an output error saying "Unable to cast double to CoordinateFrame".
Jericho1 = game.Workspace["Jericho I"] Jericho2 = game.Workspace["Jericho 2"] Warhead1 = Jericho1.Warhead Warhead2 = Jericho2.Warhead Jericho1.PrimaryPart = Warhead1 Jericho2.PrimaryPart = Warhead2 function onClicked(playerWhoClicked) for i = 1, 500 do Jericho1:SetPrimaryPartCFrame(-31.209+i, 3.451, -126.11) end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Could someone please tell me why this error occurs and/or what I need to do to fix it?
Thanks.