I am just wanting to verity, if anyone else is getting this problem, or if it something on my end.
My game contains a gun, which used to work fine, FE and all that. However, recently it has stopped firing in the correct direction.
So I dug into the code (Roblox default code, the gear came with) and I see it is getting the aim position by using Humanoid.TargetPoint to determine where the user has clicked on the screen (as described in the wiki)
So I reduced all the code down to the core concept of this. I have a generic tool with a server script which contains…
local Tool = script.Parent;
enabled = true
function onActivated()
if enabled then
enabled = false
if Tool.Parent and Tool.Parent:FindFirstChild("Humanoid") then
local character = Tool.Parent
local humanoid = character:FindFirstChild("Humanoid")
local targetPos = humanoid.TargetPoint
print(targetPos)
end
enabled = true
end
end
script.Parent.Activated:connect(onActivated)
With this, when I click somewhere it prints 0,0,0
So considering this started happening with no change to the original weapon, does that mean I need to make an error report, as the wiki does not state that this method is deprecated?
I need to add, that this DOES work correctly in a Client Script, but as the original weapon code uses is it in a Server Script, and the wiki doesn’t specify that it is Client Only, does that still constitute as an error, or maybe the wiki just needs updating?