Hello I tyried this using the Ray function and it didn't work.
game.Players.PlayerAdded:Connect(function(player)
local invisiblePart = workspace.InvisiblePart
local Ignore = player.Character
while wait(2) do --You can change the wait value to anything
local ray = Ray.new(player.Character.HumanoidRootPart.CFrame.p,Vector3.new(0,-5,0)) --Creating the ray down from the character
local part = workspace:FindPartOnRay(Ray,Ignore) -- Finding the part that the ray hits if part then -- If there is a part
if part == invisiblePart then -- If the part is the one you want to be invisible
invisiblePart.Transpareny = 1
else
invisiblePart.Transparency = 0
end
end
end)

1 comment
player.Character.HumanoidRootPart.CFrame.LookVector