Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Target Filter Issues?

Asked by 8 years ago

Alright, so basically I'm attempting to add a target filter to some walls so that when we aim a football forward, if the ball is in the way of our camera it doesn't affect where the ball goes (usually backwards). I create a local script called MouseFilter, and put inside of it this code:

local mouse = game:GetService("Players").LocalPlayer:GetMouse()
mouse.TargetFilter = workspace.BenchWalls

I have the model inside workspace, and when I go to throw the football, it doesn't correctly aim, instead it throws backwards to the wall. Help?

1
Try printing `mouse.Target:IsDescendantOf(game.Workspace.BenchWalls)`. If this is false then the target filter is working. BlackJPI 2658 — 8y

Answer this question