Mouse is nil. Need help with a proper algorithm for this. Help?
Interaction method, when you mouse over something, a function is fired.
Having trouble with the mouse being nil.
Problem:
Players.Player1.PlayerGui.LocalPlayerScripts.Interaction:276: attempt to index field 'Target' (a nil value)
Problematic code section:
03 | local Interact = pcall (mouse.Target.Changed:connect( function () |
05 | if mouse.Target.Name = = "Prop" then |
06 | HelpBarOpen( "Press 'E' to morph into this prop." ) |
11 | if mouse.Target.Parent:FindFirstChild( "Active" ) then |
12 | HelpBarOpen( "Press 'E' to interact with this" ..mouse.Target.Parent.Name "." ) |
13 | elseif mouse.Target.Parent.Parent:FindFirstChild( "Active" ) then |
14 | HelpBarOpen( "Press 'E' to interact with this" ..mouse.Target.Parent.Parent.Name "." ) |