Hi, I Tried To Make Raycast That Check Part That Below Cloned Part’s Y Size or The Original Bottom of the part when it not rotated
like in this picture
The yellow block in picture is Cloned Part
The Gray block in picture is The Part That i wanted to check
The Red Beam is Raycast
The Blue is Spot i need the raycast to check
here the script i made
local clonedobj do
clonedobj = object:Clone()
clonedobj.Parent = curpart.Parent
clonedobj:SetPrimaryPartCFrame(priCFrame)
table.insert(whitelist, clonedobj)
end
local raycastparam = RaycastParams.new()
raycastparam.FilterDescendantsInstances = {clonedobj}
raycastparam.FilterType = Enum.RaycastFilterType.Blacklist
local ray = workspace:Raycast(Vector3.new(clonedobj.PrimaryPart.Size.X/1.5,clonedobj.PrimaryPart.Size.Y/2,clonedobj.PrimaryPart.Size.Z/1.5), Vector3.new(0,-1000,0), raycastparam)
if ray then
local part = Instance.new("Part")
part.Position = ray.Position
part.Anchored = true
part.Parent = game.Workspace
end
for i,v in pairs(clonedobj:GetChildren()) do
if v:IsA("Script") then
v.Enabled = true
print("test")
end
end
I want to make raycast go to direction according Y size or default bottom of the part
sorry if it was confuse because i dont know how i can explain and make everyone understand about this