If you look at the output it changes but I did not even move a inch. If someone could tell me why it would be a big help! And also a side note do ray casts have a range? If so can I make it infinite?
edit: I forgot to mention but here is my script!
local player = game.Players.LocalPlayer
local character = player.Character
local head = character:WaitForChild("Head")
local raycastparams = RaycastParams.new()
raycastparams.FilterType = Enum.RaycastFilterType.Include
raycastparams.FilterDescendantsInstances = {game.Workspace.scp096.Hitbox}
while true do
print("e")
local ray = game.Workspace:Raycast(head.Position, head.CFrame.LookVector * 100, raycastparams)
print("e2")
print(ray)
if ray and ray.Instance then
print("e3")
print(ray.Instance)
print(ray.Instance.Parent)
end
print("e4")
wait(1)
print("e5")
end
(its a local script in starter character scripts)
What I mean is that I have one part and I only want the ray cast to work if the ray cast hits it from its front face. If it hits it from any other it should not work. Can you tell me how to do that if you know?
Well I still have not decided whether I want it to be 3rd person or 1st person. If I made it first person then your method would definitely work and in my opinion developing a game in 1st person is much easier. But I do think that the 3rd person feel is just good and I am most likely going to make the game in 3rd person thus I need to use RAY CAST because that would mean that if they put their mouse on it in 3rd person it would activate even if they were not looking at the scp and same thing even if they were they can put there mouse off the scp.
Im Pretty Sure Your Aware Of All Of This But Im Putting It In Anyway
Thanks For The Reply!
edit: the only reason i took the screen shot in first person was because it was easier Sorry For The Misunderstanding