Ello there (Has Been a Long Time i Guess.). I am writing this post out of frustration as this was my Last Option. I have this script.(idc if i revealed my Directory).
Tool.Activated:Connect(function()
local RaycastP = RaycastParams.new()
RaycastP.FilterType = Enum.RaycastFilterType.Whitelist
RaycastP.FilterDescendantsInstances = {workspace:FindFirstChild(PlayerHoldingTool.Name.."'s_House").Floors}
local ModelToPlace = Value.Value
local RayCast = workspace:Raycast(Mouse.UnitRay.Origin,Mouse.UnitRay.Direction*1000,RaycastP)
if RayCast then
local Vector = Vector3.new(math.round(RayCast.Position.X),math.round(RayCast.Position.Y) + ModelToPlace.PrimaryPart.Size.Y/2,math.round(RayCast.Position.Z))
Remote:FireServer("PlaceObject",{ModelToPlace,Vector})
print("Yes")
end
end)
Everything works fine Except theres one tiny problem. You See there is a Part Under the Filter its Referring to and I Dunno how but the Part decides to sink.(i have tried the half part fix. didnt work.)
Images :-
The Part Sinks in the Ground. The Model:
the Weld is to Hold all parts together so if i move the primarypart all parts move with them. the click and script are just for test they dont do anything and the FireServer script just does this.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(p,Request,Arguments)
if Request == "PlaceObject" then
local Part = Arguments[1]:Clone();local Vector = Arguments[2];local C = Instance.new("ClickDetector",Part.PrimaryPart);local LocalS = game.ReplicatedStorage.Tools.Tool.EditScript:Clone()
LocalS.Parent = C
LocalS.Disabled = false
Part.PrimaryPart.Position = Vector
Part.Parent = workspace:FindFirstChild(p.Name.."'s_House").Floors
print("Haha")
end
end)
Any Help will be Appreciated as i am Frustrated.