When I click the mouse, the game spawns in a model to my mouse position but I dont know how to set the model's position to the mouse position without rotating the model. It's taken me ages to try figure it out but i cant get my head around Cframe.
local player = game.Players.LocalPlayer local mouse = player:GetMouse()
function place() local foundation = game.ReplicatedStorage.Foundation:Clone() foundation.Parent = game.Workspace local x, y, z = mouse.Hit:toEulerAnglesXYZ() foundation:SetPrimaryPartCFrame(mouse.Hit.Position * CFrame.fromEulerAnglesXYZ(-x,-y,-z)) end
mouse.Button1Up:connect(place)

1 comment
Can you put it in a code block please?