(THIS IS A REPOST)
Hey, so I'm making a very basic btools system, and I need help where placing the object makes it go through the baseplate or other objects. Server
local tool = script.Parent
tool.PlaceObject.OnServerEvent:Connect(function(plr, pos)
print("recieved msg")
local block = Instance.new("Part")
local health = Instance.new("IntValue")
block.Size = Vector3.new(4,4,4)
block.Anchored = true
block.TopSurface = "Smooth"
block.BottomSurface = "Smooth"
block.Name = plr.Name.." Block"
block.BrickColor = plr.TeamColor
health.Name = "Health"
health.Value = 3
health.Parent = block
block.Parent = workspace
block.Position = pos
end)
Client
local plr = game.Players.LocalPlayer
local tool = script.Parent
local mouse = plr:GetMouse()
tool.Equipped:Connect(function()
part = Instance.new("Part")
part.Size = Vector3.new(4,4,4)
part.Anchored = true
part.CanCollide = false
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
part.Parent = workspace
part.BrickColor = plr.TeamColor
part.Transparency = .5
mouse.TargetFilter = part
mouse.Move:Connect(function()
local mouseX = mouse.Hit.X
local mouseY = mouse.Hit.Y
local mouseZ = mouse.Hit.Z
possiblePos = Vector3.new(math.floor(mouseX), math.floor(mouseY), math.floor(mouseZ))
part.CFrame = CFrame.new(possiblePos)
end)
tool.Activated:Connect(function()
local mouseX = mouse.Hit.X
local mouseY = mouse.Hit.Y
local mouseZ = mouse.Hit.Z
tool.PlaceObject:FireServer(possiblePos)
end)
end)
tool.Unequipped:Connect(function()
part:Destroy()
end)
I'm experimenting with photos, so try this: https://lh3.googleusercontent.com/-Yq1yIgMoCb4/XsMUkfda2-I/AAAAAAAAFF0/O_Q0Crxkpponl4Cbj9ue6oMIBhEhom0dwCLcBGAsYHQ/s0/wack.png
Also, pos is mouse.Hit.p
Thanks!

5 comments
My only guess is that if you are placing the model inside baseplat it will spawn on the top of it, maybe? But you can try making the transparent brick look some studs above in the local, and pass the "pos" with less Y position if it stays in the air.
You could show your local script too
Alright, I'll get it..
Try disabling collisions (not on the part)
Collisions on what then..? I'm new to this stuff.