I am trying to my rubiks cube model to go to the players left hand but when it runs the code I get no error and the model is placed at the spawn point cfrmae which is very far away from my players hand. I used print statements and the code works fine all the way except then I set the cframe. Any Ideas?

local ThrowCubeEvent = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvents").ThrowCube

ThrowCubeEvent.OnServerEvent:Connect(function(player, lookVector, cubeName)

	local char = player.Character or player.CharacterAdded:Wait()
	
	local cubeClone = game:GetService("ServerStorage"):WaitForChild("ThrowCubes")[cubeName]:Clone()
	
	cubeClone.Parent = workspace
	cubeClone.CFrame = char.LeftHand.CFrame
	cubeClone.Anchored = true
end)

4 comments

0

if its a model your gonna have to use the setprimarypartcframe function

0

its not a model, its a union

0

try using vector3.new

0

Have you tried anchoring the union BEFORE setting it's CFrame? Switch lines 10 and 11 to see if it works.