So I was copying a script @Alvin_Blox made ( Again ) but this error pops up: ’ FilterDescendantsInstances cannot be assigned to ’
script.Parent:WaitForChild('Fire').OnServerEvent:Connect(function(player, mouse)
local ray = Ray.new()
ray.FilterDescendantsInstances = {player.Character}
ray.FilterType = Enum.RaycastFilterType.Blacklist
local raycastResult = workspace:Raycast(script.Parent:FindFirstChild('Handle'), (mouse - script.Parent:FindFirstChild('Handle').Position)*300, ray)
if raycastResult then
local hit = raycastResult.Instance
local model = hit:FindFirstAncestorOfClass('Model')
if model then
if model:FindFirstChild('Humanoid') then
model:FindFirstChild('Humanoid').Health -= 30
end
end
end
end)