How can I only take the position of the player's mouse's CFrame

So I have this script I use to clone a model and place it to the player’s mouse’s position, issue is, the camera is in a scripted position which makes the model’s rotation is messed up, so I’d like to only set the position and not the rotation. I use SetPrimaryPartCFrame() so I can’t just do CFrame.Position.

ServerScriptService Code

local RemoteEvent = game:GetService('ReplicatedStorage').PlaceEvent

local function ServerEvent(player, name, hit)
	local item = game:GetService("ServerStorage"):FindFirstChild(name)
	local clone = item:Clone()
	clone.Parent = game.Workspace

1 Like

SetPrimaryPartCFrame(myCframe - myCframe.Position)

1 Like

What should I assign myCframe to? Assigning it to Hit did not work and just broke the script.

1 Like

Oops I mean SetPrimaryPartCFrame( + myCframe.Position)

1 Like

Thank you it worked!

minimum characters moment

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.