so i am trying to make a game with SCP 096 where if you look at it he will rage and kill you. im trying to use lookvector for the players head to do this but i never used lookvector so im also probably doing this wrong
game.Players.PlayerAdded:Connect(function(player) if game.Workspace["Scp 096"] == game.Workspace:FindFirstChild(player.Name).Head.CFrame.lookVector then print("test") end end)
When I get the "attempt to index nil" error, it's always meant I created a variable and never assigned it a type of value (or value itself).
I usually accidentally do this when I make variables inside of a function or conditional statement that is only being used in that statement, but never giving the variable a value or type.
Hope this helps, wolf