How to make model stay on top of baseplate?

Good morning, I’m making a placement system which uses a proximity prompt system. I’m having some trouble because I’m trying to make the items stay on top of the baseplate.

Here’s the code I’m stuck on:

	local player_pos = workspace[player.Name]:GetBoundingBox().Position - Vector3.new(0,workspace[player.Name]:GetExtentsSize().Y / 2,0)
			v.PrimaryPart.Handle.WorldPosition = Vector3.new(v.PrimaryPart.Handle.WorldPosition.X,player_pos.Y + (v:GetExtentsSize().Y / 2),v.PrimaryPart.Handle.WorldPosition.Z)
			v.PrimaryPart.Handle.Parent = workspace[player.Name].PrimaryPart

Any help is appreciated.

You need to raise its Y axis position (height) by half of its Y axis size (height).

2 Likes

Check if Mouse target surface is top.
So like this

local mouse = game.Players.LocalPlayer:GetMouse()


if mouse.TargetSurface == "Top" then
	-- your code here
end
2 Likes