What I'm asking is if you have a part and lets say a player walks near it, the half of the part is invisible (the closest part) and the other half is visible (furthest part). Please tell me if it is possible
Did some research for about an hour and I created a script that detects if there is a part in front of you in a folder named "part" to become invisible when the magnitude is over 10. And if you want to changes the can collide just remove the -- in the line Here the code:
for i,v in pairs(game.Workspace.part:GetChildren()) do local part = game.Workspace.part:GetChildren() game.Players.PlayerAdded:Connect(function(player) player.CharacterAppearanceLoaded:Connect(function(character) while wait() do local HRP = character:WaitForChild("HumanoidRootPart") if (HRP.Position - v.Position).Magnitude <= 10 then -- change mag if wanted v.Transparency = 1 --v.CanCollide = false else v.Transparency = 0 --v.CanCollide = true end end end) end) end
Here is a video of it: https://streamable.com/eqw3gc
You could take two parts that form one when put together (group + weld them together, if you want them to not be anchored) and script something that would recognize where the player is in relation to the model. That script could tell the furthest part of the model to turn its Transparency to 1. Something like, model.Transparency = 1
I wouldn't know how to write a whole code for this myself, but that's how I'd go about it, coming from a more builder background than a scripter one. You could work the code posted above by Jo1nts to function with two parts as opposed to one.