I'm working on a faux-isometric game and the biggest problem I've had so far is making sure the player character can always be seen. I've managed the problem so far by just using Touched and TouchEnded to detect if a roof or wall needs to be made transparent in order to not obstruct the camera, however it isn't very effective when multiple characters are present.
I decided that using rays to just detect any parts between the player and the camera would probably work a bit better, however I'm not very well versed with rays and the references Roblox has on them aren't very good.
The script gives this error:
Workspace.MamaGobies.Script:10: attempt to index local 'part' (a nil value)
wait(2) local character = script.Parent while wait(1) do local Ignore = character local Start = character.Torso.CFrame.Position local Vector = game:GetService("Workspace").CurrentCamera.CFrame.Position - Start local ray = Ray.new(Start, Vector) local part = workspace:FindPartOnRay(ray,Ignore) if part:IsA("Part") then part.Transparency = 1 end end
For reference, this is the camera's fixed location. http://prnt.sc/qejm8g