Hello! I'm trying to make model placement system.
But I can't get a good Y pos for this. Can you tell what is the best way to get good Y Pos?
local mouse = game.Players.LocalPlayer:GetMouse()
local model = script.Model:Clone()
model.Parent = workspace
model.PrimaryPart = model.Main
mouse.TargetFilter = model
for _,v in pairs(model:GetChildren()) do
if v:IsA("BasePart") then
v.CanCollide = false
v.Transparency = 0.5
end
end
game:GetService("RunService").RenderStepped:Connect(function()
if mouse.Target then
model:SetPrimaryPartCFrame(CFrame.new(mouse.Hit.X,mouse.Hit.Y,mouse.Hit.Z))
end
end)

1 comment
What exactly do you mean get good Y?